public int checkLogin(string userName, string passWord) { dbContext = new DbQuanLyThuVienContext(); var usr = dbContext.Users.FirstOrDefault(u => u.UserName == userName); if (usr != null) { if (usr.Password == passWord) { if (usr.Status == true) { return(1);// Đăng nhập thành công } else { return(-1);//Tài khoả đã bị khoá } } else { return(0);//Sai mật khẩu } } else { return(-2);//Tài khoản không tồn tại } }
public BaseRepository() { _dbContext = new DbQuanLyThuVienContext(); dbSet = _dbContext.Set <T>(); }
public ApplicationUserStore(DbQuanLyThuVienContext context) : base(context) { }