public List <UserInfo> GetUserInfoList() { using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext()) { var count = _context.UserInfo.ToList(); return(count); } }
public List <T_Books> GetBooksList() { using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext()) { var result = _context.T_Books.ToList(); return(result); } }
public int GetUserCount() { using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext()) { var count = _context.UserInfo.Count(); return(count); } }
public int GetBooksCount() { using (EFMYSQL.MyDbContext _context = new EFMYSQL.MyDbContext()) { var count = _context.T_Books.Count(); return(count); } }