AIHITService

This commit is contained in:
Mikhail Kuznetsov
2023-08-23 16:57:38 +10:00
parent 906982d08d
commit f3914c07a4
10 changed files with 105 additions and 91 deletions

View File

@@ -2,6 +2,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using PARR.AIHIT.Context;
using PARR.AIHIT.Services;
using PARR.AIHIT.Settings;
namespace PARR.AIHIT
@@ -13,12 +14,21 @@ namespace PARR.AIHIT
var syncherSettings = new SyncherSettings();
configuration.GetSection(nameof(SyncherSettings)).Bind(syncherSettings);
services.AddSingleton(syncherSettings);
services.AddDbContext<AIHITContext>(options =>
options.UseSqlServer(
configuration.GetConnectionString("AihitConnection")
));
services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
services.AddTransient<ISyncher, Syncher>();
services.AddTransient<IAIHITService,AIHITService>();
//services.AddDbContext <AIHContext> (options =>
//services.AddDbContext <AIHITContext> (options =>
//{
// options.UseSqlServer("server=(10.248.19.97);uid=awhit-ipp-parr;pwd=ET3h$9y1LH#D");
//});