diff --git a/src/admin/Bootstrap.Admin/Bootstrap.Admin.csproj b/src/admin/Bootstrap.Admin/Bootstrap.Admin.csproj
index dc904a17..b37e3cb9 100644
--- a/src/admin/Bootstrap.Admin/Bootstrap.Admin.csproj
+++ b/src/admin/Bootstrap.Admin/Bootstrap.Admin.csproj
@@ -17,6 +17,7 @@
+
diff --git a/src/admin/Bootstrap.Admin/Program.cs b/src/admin/Bootstrap.Admin/Program.cs
index ecf28057..24283f9c 100644
--- a/src/admin/Bootstrap.Admin/Program.cs
+++ b/src/admin/Bootstrap.Admin/Program.cs
@@ -1,7 +1,5 @@
-using Bootstrap.DataAccess;
-using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
-using Microsoft.Extensions.DependencyInjection;
namespace Bootstrap.Admin
{
diff --git a/src/admin/Bootstrap.Admin/Startup.cs b/src/admin/Bootstrap.Admin/Startup.cs
index a6c956c6..ae3f6aa5 100644
--- a/src/admin/Bootstrap.Admin/Startup.cs
+++ b/src/admin/Bootstrap.Admin/Startup.cs
@@ -6,6 +6,8 @@ using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpOverrides;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Versioning;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
@@ -79,13 +81,13 @@ namespace Bootstrap.Admin
op.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";
JsonConvert.DefaultSettings = () => op.SerializerSettings;
});
- //services.AddApiVersioning(option =>
- //{
- // option.DefaultApiVersion = new ApiVersion(1, 0);
- // option.ReportApiVersions = true;
- // option.AssumeDefaultVersionWhenUnspecified = true;
- // option.ApiVersionReader = ApiVersionReader.Combine(new HeaderApiVersionReader("api-version"), new QueryStringApiVersionReader("api-version"));
- //});
+ services.AddApiVersioning(option =>
+ {
+ option.DefaultApiVersion = new ApiVersion(1, 0);
+ option.ReportApiVersions = true;
+ option.AssumeDefaultVersionWhenUnspecified = true;
+ option.ApiVersionReader = ApiVersionReader.Combine(new HeaderApiVersionReader("api-version"), new QueryStringApiVersionReader("api-version"));
+ });
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.