public void Dispose() { try { if (Context == null) { return; } Context.SaveChanges(); Context.Dispose(); } catch (ObjectDisposedException) { } finally { Context = null; } }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, DakiAccDbContext accDbContext, DakiDbContext dakiDbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } app.UseAuthentication(); app.UseHttpsRedirection(); app.UseMvc(routes => { routes.MapRoute("default", "{controller}/{action}/{id?}"); }); app.UseCors(); // accDbContext.Database.EnsureCreated(); dakiDbContext.Database.EnsureCreated(); }
public HuntService(DakiDbContext dbContext) : base(dbContext) { }
public ServiceBase(DakiDbContext dbContext) { Context = dbContext; }
public UserPropertiesService(DakiDbContext dbContext) : base(dbContext) { }
public UserService(DakiDbContext dbContext) : base(dbContext) { }