public ShowCaseController(
     FoodOrderIdentityContext context,
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager
     )
 {
     this.context       = context;
     this.userManager   = userManager;
     this.signInManager = signInManager;
 }
Example #2
0
        // Middleware - request pipeline
        public void Configure(
            IApplicationBuilder app,
            IHostingEnvironment env,
            IServiceProvider serviceProvider,
            FoodOrderIdentityContext context,
            UserManager <ApplicationUser> userManager,
            RoleManager <IdentityRole> roleManager
            )
        {
            var userStoreManage = serviceProvider.GetService <UserManager <FoodOrderIdentityContext> >();


            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            else
            {
                app.UseHsts();
            }

            app.UseHttpsRedirection();

            app.UseStaticFiles();

            app.UseCookiePolicy();

            app.UseAuthentication();

            app.UseCors(builder => builder
                        .AllowAnyOrigin()
                        .AllowAnyMethod()
                        .AllowAnyHeader()
                        .AllowCredentials());

            app.UseMvc();

            // Call the Initilize method to seed the database with data
            Initializer.Initialize(context, userManager, roleManager).Wait();
        }
 public DiscountController(FoodOrderIdentityContext context)
 {
     _context = context;
 }
 public IngredientController(FoodOrderIdentityContext context)
 {
     _context = context;
 }
 public CategoryController(FoodOrderIdentityContext context)
 {
     _context = context;
 }