public ChoresController(ChoresContext context, UserManager <IdentityUser> userManager, SignInManager <IdentityUser> signInManager) { this.context = context; this.userManager = userManager; this.signInManager = signInManager; }
public static void InitializeIfNeeded(this ChoresContext choresContext) { choresContext.Database.EnsureCreated(); if (choresContext.Chores.Any()) { return; } choresContext.Chores.Add(new ChoreDto { Title = "Clean my room", Description = "Make sure all toys and clothes are put away and the floor is clean before bed.", }); choresContext.SaveChanges(); }
public ChoresController(ChoresContext context) { m_context = context; }