// This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { // Add framework services. var context = new ALittleExtraContext(); context.Database.Migrate(); services.AddDbContext <ALittleExtraContext>(); services.AddIdentity <ApplicationUser, IdentityRole>(options => { options.Password.RequireUppercase = false; options.Password.RequireLowercase = false; options.Password.RequireDigit = false; options.Password.RequireNonAlphanumeric = false; options.Password.RequiredLength = 2; options.User.AllowedUserNameCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+. "; }) .AddEntityFrameworkStores <ALittleExtraContext>() .AddDefaultTokenProviders(); services.AddMvc(); }
public AccountsController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, ALittleExtraContext context) { UserManager = userManager; SignInManager = signInManager; _context = context; }
public StoresController(UserManager <ApplicationUser> userManager, ALittleExtraContext context) { _userManager = userManager; _context = context; }