示例#1
0
        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;
            }
        }
示例#2
0
文件: Startup.cs 项目: haipk/app_pc
        // 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);
        }
示例#3
0
 public IndiciadoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
 public ObjetoApreendidoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#5
0
 public UnitOfWork(SpcContext context)
 {
     _context = context;
 }
示例#6
0
 public MovimentacaoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#7
0
 public VitimaRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#8
0
 public SituacaoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#9
0
 public RelatorioRepository(SpcContext dbContext)
 {
     DbContext = dbContext;
 }
示例#10
0
 public AssuntoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#11
0
 public ProcedimentoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#12
0
        private bool disposedValue = false; // To detect redundant calls

        public Repository(SpcContext dbContext)
        {
            DbContext = dbContext;
            DbSet     = DbContext.Set <TModel>();
        }
示例#13
0
 public UnidadePolicialRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#14
0
 public VaraCriminalRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#15
0
 public ArtigoRepository(SpcContext dbContext) : base(dbContext)
 {
 }
示例#16
0
 public MunicipioRepository(SpcContext dbContext) : base(dbContext)
 {
 }