コード例 #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, EpicenterDbContext dbContext)
        {
            //if (env.IsDevelopment())
            //{
            app.UseDeveloperExceptionPage();
            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "Epicenter API");
                c.RoutePrefix = string.Empty;
            });
            //}
            dbContext.Database.EnsureCreated();

            app.UseHttpsRedirection();

            app.UseCors(AllowAllCorsPolicy);

            app.UseAuthentication();

            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }
コード例 #2
0
 public PersonRepository(EpicenterDbContext context)
 {
     _dbContext = context;
 }
 public LearningDayRepository(EpicenterDbContext dbContext) : base(dbContext)
 {
 }
コード例 #4
0
 public EmployeeRepository(EpicenterDbContext dbContext) : base(dbContext)
 {
 }
 public InvitationRepository(EpicenterDbContext dbContext) : base(dbContext)
 {
 }
コード例 #6
0
 public LogRepository(EpicenterDbContext dbContext) : base(dbContext)
 {
 }
コード例 #7
0
 public Repository(EpicenterDbContext dbContext)
 {
     DbContext = dbContext;
 }
コード例 #8
0
 public TimestampRepository(EpicenterDbContext context)
 {
     _dbContext = context;
 }
コード例 #9
0
ファイル: PlateRepository.cs プロジェクト: zaicevas/epicenter
 public PlateRepository(EpicenterDbContext context)
 {
     _dbContext = context;
 }