diff options
author | crupest <crupest@outlook.com> | 2020-01-31 20:25:06 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-01-31 20:25:06 +0800 |
commit | e6d8183f6e5c9dec848fefa007b0e3ab428bbffa (patch) | |
tree | abe33b40e36a2b105879f23f6a93f8fe7153e288 /Timeline/Startup.cs | |
parent | 0dc8b59b435f978428c73bc28e2a424bc413c562 (diff) | |
download | timeline-e6d8183f6e5c9dec848fefa007b0e3ab428bbffa.tar.gz timeline-e6d8183f6e5c9dec848fefa007b0e3ab428bbffa.tar.bz2 timeline-e6d8183f6e5c9dec848fefa007b0e3ab428bbffa.zip |
Fix a bug in url generation and add development database migration.
Diffstat (limited to 'Timeline/Startup.cs')
-rw-r--r-- | Timeline/Startup.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Timeline/Startup.cs b/Timeline/Startup.cs index 998b5c44..14ee37e3 100644 --- a/Timeline/Startup.cs +++ b/Timeline/Startup.cs @@ -2,9 +2,11 @@ using AutoMapper; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
+using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using System;
using System.Text.Json.Serialization;
@@ -87,6 +89,8 @@ namespace Timeline services.AddScoped<IPersonalTimelineService, PersonalTimelineService>();
+ services.TryAddSingleton<IActionContextAccessor, ActionContextAccessor>();
+
var databaseConfig = Configuration.GetSection(nameof(DatabaseConfig)).Get<DatabaseConfig>();
if (databaseConfig.UseDevelopment)
|