1234567891011121314151617 |
- using System;
- namespace MySystem
- {
- public static class StringExtension
- {
- #region sql条件拼装
- public static string Like(this string input, string Field, string Value)
- {
- if (!string.IsNullOrEmpty(Value))
- {
- input += " and " + Field + " like '%" + Value + "%'";
- }
- return input;
- }
- #endregion
- }
- }
|