コード例 #1
0
 public long GetTotalCount(string keyWords)
 {
     using (ZSZContext zsz = new ZSZContext())
     {
         BaseService <AdminUserEntity> bsAdmin = new BaseService <AdminUserEntity>(zsz);
         if (!string.IsNullOrEmpty(keyWords))
         {
             var list = bsAdmin.GetAll().Where(e => e.Name.Contains(keyWords) || e.PhoneNum.Contains(keyWords));
             return(list.LongCount());
         }
         return(bsAdmin.GetTotalCount());
     }
 }