Пример #1
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, SIENNDbContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }


            /*
             * app.UseMvc(routes =>
             * {
             *  routes.MapRoute("default", "{controller=Units}/{action=Index}/{id?}");
             * });
             */



            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "SIENN Recruitment API v1");
            });

            SIENNDbInitializer.Initialize(context);
            app.UseMvc();
        }
Пример #2
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, SIENNDbContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseSwagger();
            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "SIENN Recruitment API v1");
            });

            SIENNDbInitializer.Initialize(context);
            app.UseMvc();
        }