1:IBaseDAL

 1 using System;
 2 using System.Collections.Generic;
 3 using System.Linq;
 4 using System.Linq.Expressions;
 5 using System.Text;
 6 using System.Threading.Tasks;
 7 
 8 namespace C01.ZRF.IDAL
 9 {
10     public interface IBaseDAL<T> where T : class
11     {
12 
13         int SaveChanges();
14 
15         void Add(T model);
16 
17         void Delete(T model);
18 
19         void DeleteBy(System.Linq.Expressions.Expression<Func<T, bool>> delWhere);
20 
21         void Modify(T model, params string[] propertyNames);
22 
23         IQueryable<T> Where(Expression<Func<T, bool>> whereLambda);
24 
25         IQueryable<T> WhereOrder<TKey>(Expression<Func<T, bool>> whereLambda, Expression<Func<T, TKey>> keySelector, bool isAsc = true);
26 
27         IQueryable<T> WhereInclude(Expression<Func<T, bool>> whereLambda, params string[] includePropertyNames);
28 
29         IQueryable<T> WhereInclude<TKey>(Expression<Func<T, bool>> whereLambda, Expression<Func<T, TKey>> keySelector, bool isAsc = true, params string[] includePropertyNames);
30 
31         IEnumerable<T> WherePaged<TKey>(int PageIndex, int PageSize, out int totalCount, Expression<Func<T, bool>> whereLambda, Expression<Func<T, TKey>> keySelector, bool isAsc = true, params string[] includePropertyNames);
32 
33         IQueryable<T> QueryBySql(string sql, params System.Data.SqlClient.SqlParameter[] ps);
34     }
35 }
View Code

相关文章:

  • 2021-08-21
  • 2022-01-13
  • 2021-12-30
  • 2022-01-22
  • 2021-07-13
  • 2021-12-16
  • 2022-01-05
  • 2021-11-27
猜你喜欢
  • 2021-04-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
  • 2021-11-17
  • 2021-05-19
  • 2021-12-03
相关资源
相似解决方案