Beispiel #1
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IWebHostEnvironment env, BabyTrackerContext context)
 {
     if (env.IsProduction())
     {
         app.UseExceptionHandler("/Error/Error500");
     }
     else
     {
         app.UseDeveloperExceptionPage();
         app.UseStatusCodePages();
     }
     app.UseStaticFiles();
     app.UseRouting();
     app.UseAuthentication();
     app.UseAuthorization();
     app.UseEndpoints(endpoints =>
     {
         endpoints.MapControllers();
         endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
         endpoints.MapRazorPages();
     });
     IdentitySeedData.CreateAdminAccount(app.ApplicationServices, Configuration);
     SeedData.SeedDatabase(context, app.ApplicationServices);
 }
 public DiaperController(BabyTrackerContext ctx, UserManager <IdentityUser> usrMgr)
 {
     context     = ctx;
     userManager = usrMgr;
 }
Beispiel #3
0
 public UsersController(BabyTrackerContext context)
 {
     _context = context;
 }
 public DiaperChanges1Controller(BabyTrackerContext context)
 {
     _context = context;
 }
 public FeedingsController(BabyTrackerContext context)
 {
     _context = context;
 }
 public BabyInfoesController(BabyTrackerContext context)
 {
     _context = context;
 }
Beispiel #7
0
 public BabyMileStonesController(BabyTrackerContext context)
 {
     _context = context;
 }