Exemplo n.º 1
0
 /// <summary>
 /// 获取所有没有软删除的数据
 /// </summary>
 /// <returns></returns>
 public IQueryable <T> GetAll()
 {
     return(ctx.Set <T>().Where(e => e.IsDeleted == false));
 }
Exemplo n.º 2
0
 /// <summary>
 /// 查询数据库中所有的数据
 /// </summary>
 /// <returns></returns>
 public IQueryable <T> GetAll()
 {
     return(context.Set <T>().Where(c => c.IsDeleted == false));
 }