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 | a7fd42ddee50a8066a083c57b7940e4f9896dcb7 (patch) | |
tree | abe33b40e36a2b105879f23f6a93f8fe7153e288 /Timeline/Startup.cs | |
parent | 45a6ca3a189a81060ae44d0764248547fe2b686c (diff) | |
download | timeline-a7fd42ddee50a8066a083c57b7940e4f9896dcb7.tar.gz timeline-a7fd42ddee50a8066a083c57b7940e4f9896dcb7.tar.bz2 timeline-a7fd42ddee50a8066a083c57b7940e4f9896dcb7.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)
|