AIHITService
This commit is contained in:
@@ -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");
|
||||
//});
|
||||
|
||||
Reference in New Issue
Block a user