/// <summary> /// 针对IDelete的查询模型 /// 会受到 PropertiesCache<TEntity>.BlockWhereFields 的影响 /// </summary> /// <typeparam name="TEntity"></typeparam> /// <typeparam name="TQueryModel"></typeparam> /// <param name="delete">操作句柄</param> /// <param name="queryModel">查询模型</param> public static IDelete <TEntity> WhereWithModel <TEntity, TQueryModel>(this IDelete <TEntity> delete, TQueryModel queryModel) where TEntity : class where TQueryModel : QueryModel, new() { //QueryOperator<TEntity, TQueryModel>.DeleteWhereHandler(delete, queryModel); if (queryModel.Fuzzy != null && queryModel.Fuzzy.Length != 0) { return(delete.Where(GetFuzzyExpression <TEntity, TQueryModel>(queryModel))); } return(delete); }
public static IDelete <TEntity> WhereWithEntity <TEntity>(this IDelete <TEntity> delete, IEnumerable <string> collection, TEntity entity) where TEntity : class { return(delete.Where(GetWhereExpression(collection, entity))); }