public void Configure(IApplicationBuilder app, IHostingEnvironment env, FanSoftStoreDataContext ctx) { app.UseStaticFiles(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); DbInitializer.Init(ctx); app.UseNodeModules(env.ContentRootPath); } app.UseAuthentication(); app.UseMvcWithDefaultRoute(); app.Run(async(context) => { context.Response.Headers.Add("Content-type", "text/html;charset=utf-8"); await context.Response.WriteAsync("Recurso não encontrado"); }); }
public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); using (var ctx = new FanSoftStoreDataContext()) { DbInitializer.Init(ctx); } } app.UseMvcWithDefaultRoute(); app.Run(async(context) => { context.Response.Headers.Add("Content-type", "text/html;charset=utf-8"); await context.Response.WriteAsync("Recurso não encontrado"); }); }
public ProdutosController(FanSoftStoreDataContext ctx) { _ctx = ctx; }
public ContaController(FanSoftStoreDataContext ctx) { _ctx = ctx; }