private const int RESPONSE_CACHE_DURATION = 120; // seconds public OrganismController(GeCoDbContext context, IOrganismRepository organismRepository, IMemoryCache memoryCache) { _organismRepository = organismRepository; _context = context; _cache = memoryCache; }
public GenotypeRepository(GeCoDbContext context) : base(context) { }
public TextSourceRepository(GeCoDbContext context) : base(context) { }
private const int RESPONSE_CACHE_DURATION = 120; // seconds public TraitController(GeCoDbContext context, ITraitRepository traitRepository) { _traitRepository = traitRepository; _context = context; }
public TagRepository(GeCoDbContext context) : base(context) { }
public AlleleController(GeCoDbContext context, IAlleleRepository alleleRepository) { _alleleRepository = alleleRepository; _context = context; }
public OrganismRepository(GeCoDbContext context) : base(context) { }
public EntityBaseRepository(GeCoDbContext context) { _context = context; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, GeCoDbContext geCoDbContext) { loggerFactory.AddConsole(Configuration.GetSection("Logging")); loggerFactory.AddDebug(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions { HotModuleReplacement = true }); } else { app.UseExceptionHandler("/Home/Error"); } app.UseStaticFiles(); app.UseCors(builder => builder.AllowAnyOrigin() .AllowAnyHeader() .AllowAnyMethod()); app.UseExceptionHandler( builder => { builder.Run( async context => { context.Response.StatusCode = (int)HttpStatusCode.InternalServerError; context.Response.Headers.Add("Access-Control-Allow-Origin", "*"); var error = context.Features.Get <IExceptionHandlerFeature>(); if (error != null) { context.Response.AddApplicationError(error.Error.Message); await context.Response.WriteAsync(error.Error.Message).ConfigureAwait(false); } }); }); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); routes.MapSpaFallbackRoute( name: "spa-fallback", defaults: new { controller = "Home", action = "Index" }); }); // DbInitializer.Initialize(geCoDbContext); }
public AlleleRepository(GeCoDbContext context) : base(context) { }
public InheritenceRepository(GeCoDbContext context) : base(context) { }