Beispiel #1
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env, MCUContext marvelCinemaContext)
 {
     app.UseCors(builder =>
                 builder.WithOrigins("http://localhost:4200", "http://www.myclientserver.com")
                 .AllowAnyOrigin()
                 .AllowAnyHeader()
                 .AllowAnyMethod());
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     app.UseAuthentication();
     app.UseDefaultFiles();
     app.UseStaticFiles();
     app.UseMvc();
     DBInitializer.Initialize(marvelCinemaContext);
 }
Beispiel #2
0
 public MovieController(MCUContext context)
 {
     this.context = context;
 }
 public HeroController(MCUContext context)
 {
     this.context = context;
 }
Beispiel #4
0
 public VillainController(MCUContext context)
 {
     this.context = context;
 }