protected virtual void Dispose(bool disposing) { if (!disposedValue) { if (disposing) { // TODO: dispose managed state (managed objects). DbContext.Dispose(); } // TODO: free unmanaged resources (unmanaged objects) and override a finalizer below. // TODO: set large fields to null. DbContext = null; DbSet = null; disposedValue = true; } }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, SpcContext spcContext, ApplicationDbContext applicationDbContext, UserManager <ApplicationUser> userManager, RoleManager <IdentityRole> roleManager) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseHsts(); } //app.UseForwardedHeaders(new ForwardedHeadersOptions //{ // ForwardedHeaders = Microsoft.AspNetCore.HttpOverrides.ForwardedHeaders.XForwardedFor | Microsoft.AspNetCore.HttpOverrides.ForwardedHeaders.XForwardedProto //}); app.UseResponseCompression(); //app.UseHttpsRedirection(); // Criação das estruturas e inserção // de dados iniciais new SpcContextInitializer(spcContext) .Initialize(); // Criação de estruturas, usuários e permissões // na base do ASP.NET Identity Core (caso ainda não // existam) new IdentityInitializer(applicationDbContext, userManager, roleManager) .Initialize(); app.UseMvc(); app.UseCors(x => x.AllowAnyOrigin()); ConfigureDataDirectory(env); }
public IndiciadoRepository(SpcContext dbContext) : base(dbContext) { }
public ObjetoApreendidoRepository(SpcContext dbContext) : base(dbContext) { }
public UnitOfWork(SpcContext context) { _context = context; }
public MovimentacaoRepository(SpcContext dbContext) : base(dbContext) { }
public VitimaRepository(SpcContext dbContext) : base(dbContext) { }
public SituacaoRepository(SpcContext dbContext) : base(dbContext) { }
public RelatorioRepository(SpcContext dbContext) { DbContext = dbContext; }
public AssuntoRepository(SpcContext dbContext) : base(dbContext) { }
public ProcedimentoRepository(SpcContext dbContext) : base(dbContext) { }
private bool disposedValue = false; // To detect redundant calls public Repository(SpcContext dbContext) { DbContext = dbContext; DbSet = DbContext.Set <TModel>(); }
public UnidadePolicialRepository(SpcContext dbContext) : base(dbContext) { }
public VaraCriminalRepository(SpcContext dbContext) : base(dbContext) { }
public ArtigoRepository(SpcContext dbContext) : base(dbContext) { }
public MunicipioRepository(SpcContext dbContext) : base(dbContext) { }