示例#1
0
 public List <UserInfo> GetUserInfoList()
 {
     using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext())
     {
         var count = _context.UserInfo.ToList();
         return(count);
     }
 }
示例#2
0
 public List <T_Books> GetBooksList()
 {
     using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext())
     {
         var result = _context.T_Books.ToList();
         return(result);
     }
 }
示例#3
0
 public int GetUserCount()
 {
     using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext())
     {
         var count = _context.UserInfo.Count();
         return(count);
     }
 }
示例#4
0
 public int GetBooksCount()
 {
     using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext())
     {
         var count = _context.T_Books.Count();
         return(count);
     }
 }