From 647006822f01a53dade5ea040210059a98a43196 Mon Sep 17 00:00:00 2001 From: 杨宇千 Date: Sun, 18 Aug 2019 19:15:44 +0800 Subject: Add avatar controller. --- Timeline/Services/UserAvatarService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Timeline/Services/UserAvatarService.cs') diff --git a/Timeline/Services/UserAvatarService.cs b/Timeline/Services/UserAvatarService.cs index 21153575..4f11978c 100644 --- a/Timeline/Services/UserAvatarService.cs +++ b/Timeline/Services/UserAvatarService.cs @@ -1,5 +1,6 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using System; using System.IO; @@ -178,4 +179,13 @@ namespace Timeline.Services } } } + + public static class UserAvatarServiceCollectionExtensions + { + public static void AddUserAvatarService(this IServiceCollection services) + { + services.AddScoped(); + services.AddSingleton(); + } + } } -- cgit v1.2.3