| | |
| | | 锘縰sing Microsoft.Extensions.DependencyInjection; |
| | | using System; |
| | | 锘縰sing System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using Microsoft.Extensions.DependencyInjection; |
| | | using WIDESEA_Core.Helper; |
| | | using WIDESEA_Core.Seed; |
| | | using WIDESEA_Core.Util; |
| | | |
| | | namespace WIDESEA_Core |
| | | { |
| | |
| | | public static void AddDbSetup(this IServiceCollection services) |
| | | { |
| | | if (services == null) throw new ArgumentNullException(nameof(services)); |
| | | |
| | | |
| | | services.AddScoped<DBSeed>(); |
| | | services.AddScoped<DBContext>(); |
| | | // 娉ㄥ唽IHttpClientFactory |
| | | services.AddHttpClient(); |
| | | // 娉ㄥ唽HttpHelper |
| | | services.AddScoped<HttpClientHelper>(); |
| | | |
| | | |
| | | } |
| | | } |
| | | } |