移除QA消息通知代码
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
namespace IRaCIS.Core.Infrastructure.Extention
|
||||
{
|
||||
public static class QueryableWhereExtension
|
||||
{
|
||||
public static IQueryable<TEntity> WhereIf<TEntity>(this IQueryable<TEntity> query, [NotNullWhen(true)] bool condition, Expression<Func<TEntity, bool>> filter) where TEntity : class
|
||||
{
|
||||
return condition ? query.Where(filter) : query;
|
||||
}
|
||||
|
||||
public static IEnumerable<TEntity> WhereIf<TEntity>(this IEnumerable<TEntity> query, bool condition, Func<TEntity, bool> filter) where TEntity : class
|
||||
{
|
||||
return condition ? query.Where(filter) : query;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user