Example #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, Telekom2Context context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }
            app.UseCors("AllowMyOrigin");
            app.UseRouting();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
            context.Database.EnsureCreated();
            app.UseSwagger(); app.UseSwaggerUI(options =>
            {
                options.SwaggerEndpoint("/swagger/v1/swagger.json", "Swagger Demo API");
            });
        }
Example #2
0
 public StatesController(Telekom2Context context)
 {
     _context = context;
 }
Example #3
0
 public PatientsController(Telekom2Context context)
 {
     _context = context;
 }
Example #4
0
 public CitiesController(Telekom2Context context)
 {
     _context = context;
 }