// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, UserManager <User> userManager, RoleManager <IdentityRole> roleManager, FloLabContext context) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } InitData.Init(roleManager, userManager, context).Wait(); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseAuthentication(); app.UseMvc(); app.UseSpa(spa => { // To learn more about options for serving an Angular SPA from ASP.NET Core, // see https://go.microsoft.com/fwlink/?linkid=864501 spa.Options.SourcePath = "flolab-frontend"; if (env.IsDevelopment()) { spa.UseAngularCliServer(npmScript: "start"); } }); }
public Repository(FloLabContext context) { _context = context; _table = _context.Set <T>(); }
public UserService(FloLabContext context, IRepository <UserDay> repository) { _context = context; _repository = repository; }