Beispiel #1
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ITmdbService serv)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            serv.Seed().Wait();
            app.UseHttpsRedirection();

            app.UseStaticFiles();

            app.UseCors(x => x
                        .AllowAnyOrigin()
                        .AllowAnyMethod()
                        .AllowAnyHeader()
                        .AllowCredentials());

            app.UseAuthentication();

            app.UseMvc();
        }
Beispiel #2
0
 public void Seed()
 {
     service.Seed();
 }