Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ASP.NET Core Basics/src/Contacts/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ public void ConfigureServices(IServiceCollection services)

services.AddDbContext<ContactsContext>(options =>
options.UseSqlServer(Configuration["Data:ContactsContext:ConnectionString"]));

services.AddSwaggerGen();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down Expand Up @@ -94,6 +96,9 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});

app.UseSwagger();
app.UseSwaggerUi();
}
}
}
5 changes: 3 additions & 2 deletions ASP.NET Core Basics/src/Contacts/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"userSecretsId": "aspnet-Contacts-cd2c7b27-e79c-43c7-b3ef-1ecb04374b70",

"dependencies": {
Expand Down Expand Up @@ -43,7 +43,8 @@
"version": "1.1.0-preview4-final",
"type": "build"
},
"BundlerMinifier.Core": "2.2.301"
"BundlerMinifier.Core": "2.2.301",
"Swashbuckle": "6.0.0-beta902"
},

"tools": {
Expand Down