File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,8 @@ public void ConfigureServices(IServiceCollection services)
7272 services . AddScoped ( cfg => cfg . GetService < IOptions < AuthenticationSettings > > ( ) . Value ) ;
7373 #endregion
7474 #region Setting Db
75- services . AddDbContext < ApplicationDbContext > ( _ => _ . UseSqlServer ( Configuration . GetConnectionString ( "ApplicationDbContextConnection" ) ) ) ;
76-
7775 var cnnString = Configuration . GetConnectionString ( "PSCContextConnection" ) ;
78- services . AddDbContext < PSCContext > ( _ => _ . UseSqlServer ( cnnString ) ) ;
79- services . ConfigureAudit ( cnnString ) ;
76+ services . AddDbContext < ApplicationDbContext > ( _ => _ . UseSqlServer ( Configuration . GetConnectionString ( "ApplicationDbContextConnection" ) ) ) ;
8077 #endregion
8178 #region Dependency Injection
8279 services . AddTransient < IEmailSender , EmailSender > ( ) ;
Original file line number Diff line number Diff line change 88 },
99 "AllowedHosts" : " *" ,
1010 "ConnectionStrings" : {
11- "ApplicationDbContextConnection" : " "
11+ "ApplicationDbContextConnection" : " " ,
12+ "PSCContextConnection" : " "
1213 },
1314 "SmtpCredentials" : {
1415 "MailFrom" : " " ,
Original file line number Diff line number Diff line change @@ -19,8 +19,10 @@ public static class PersistenceServiceRegistration
1919 {
2020 public static IServiceCollection AddPersistenceServices ( this IServiceCollection services , IConfiguration configuration )
2121 {
22+ var cnnString = configuration . GetConnectionString ( "PSCContextConnection" ) ;
2223 services . AddDbContext < PSCContext > ( options =>
23- options . UseSqlServer ( configuration . GetConnectionString ( "GloboTicketTicketManagementConnectionString" ) ) ) ;
24+ options . UseSqlServer ( cnnString ) ) ;
25+ services . ConfigureAudit ( cnnString ) ;
2426
2527 services . AddScoped ( typeof ( IAsyncRepository < > ) , typeof ( BaseRepository < > ) ) ;
2628
You can’t perform that action at this time.
0 commit comments