public ChoresController(ChoresContext context,
                         UserManager <IdentityUser> userManager,
                         SignInManager <IdentityUser> signInManager)
 {
     this.context       = context;
     this.userManager   = userManager;
     this.signInManager = signInManager;
 }
示例#2
0
        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();
        }
示例#3
0
 public ChoresController(ChoresContext context)
 {
     m_context = context;
 }