public static bool Login(string login, string password) { using (TaskListDBContext db = new TaskListDBContext()) { string hashpw = Helper.GetHash(password); login = login.ToLower(); return(db.Users.Any(user => user.Username == login && user.Password == hashpw)); } }
public HomeController(ILogger <HomeController> logger, TaskListDBContext context) { _logger = logger; _context = context; }
public TaskListController(TaskListDBContext db) { _db = db; }
public TaskListController(TaskListDBContext context) { _context = context; }