public LoginController(IConfiguration config, DayFixContext context) { _config = config; _context = context; if (!_context.RegisteredUsers.Any(ru => ru.UserName == "admin")) { // Create a default admin account _context.RegisteredUsers.Add(new UserModel { UserName = "******", Password = "******", EmailAddress = "*****@*****.**" }); _context.SaveChanges(); } }
public DayFixController(DayFixContext context) { _context = context; }