12345678910111213141516171819202122232425 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using System.Text;
- using System.Threading.Tasks;
- namespace Ant.Core.SqlServer
- {
- public static class QueryableExtensions
- {
-
-
-
-
-
-
-
-
- public static IQueryable<T> WhereIf<T>(this IQueryable<T> source, bool condition, Expression<Func<T, bool>> predicate)
- {
- return condition ? source.Where(predicate) : source;
- }
- }
- }
|