From 402f9568e48e6e1a9d29d37dcda46737047425d5 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期四, 25 十一月 2021 10:49:10 +0800 Subject: [PATCH] 专家通讯录优化 --- zhengcaioa/zhengcaioa/Startup.cs | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/zhengcaioa/zhengcaioa/Startup.cs b/zhengcaioa/zhengcaioa/Startup.cs index 58f88ba..0fff994 100644 --- a/zhengcaioa/zhengcaioa/Startup.cs +++ b/zhengcaioa/zhengcaioa/Startup.cs @@ -68,7 +68,12 @@ var connectionString = Configuration.GetConnectionString("DefaultConnection"); services.AddDbContext<zhengcaioaContext>(options => - options.UseSqlServer(connectionString)); + options.UseSqlServer(connectionString)); + + var connectionString1 = Configuration.GetConnectionString("zcwebConnection"); + services.AddDbContext<zcwebContext>(options => + options.UseSqlServer(connectionString1)); + services.AddControllersWithViews(); services.AddScoped(typeof(ISimService), typeof(SimService)); @@ -139,12 +144,26 @@ services.AddScoped(typeof(IOrderBanciDtlService), typeof(OrderBanciDtlService)); services.AddScoped(typeof(IOrderBanciService), typeof(OrderBanciService)); services.AddScoped(typeof(IOrderBanciOrderService), typeof(OrderBanciOrderService)); - + services.AddScoped(typeof(ISysBaimingdanService), typeof(SysBaimingdanService)); + + services.AddScoped(typeof(IAdmZhanghaomimaService), typeof(AdmZhanghaomimaService)); + services.AddScoped(typeof(IAdmTongxunluService), typeof(AdmTongxunluService)); + + services.AddScoped(typeof(IAskService), typeof(AskService)); + services.AddScoped(typeof(IAdmGoodsRecordService), typeof(AdmGoodsRecordService)); + services.AddScoped(typeof(IExpertTestTopicService), typeof(ExpertTestTopicService)); + + //zcweb + services.AddScoped(typeof(IDtChannelArticleNewsService), typeof(DtChannelArticleNewsService)); //定时执行 services.AddHostedService<TimedBackgroundService>(); + //定时执行 + services.AddHostedService<TimerGetShopUsersService>(); + + services.AddAutoMapper(typeof(AutoMapperConfigs)); services.AddUEditorService("ueditor.json", true, "wwwroot"); services.AddMvc(options =>{ -- Gitblit v1.9.1