File tree 3 files changed +6
-6
lines changed
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)
72
72
services . AddScoped ( cfg => cfg . GetService < IOptions < AuthenticationSettings > > ( ) . Value ) ;
73
73
#endregion
74
74
#region Setting Db
75
- services . AddDbContext < ApplicationDbContext > ( _ => _ . UseSqlServer ( Configuration . GetConnectionString ( "ApplicationDbContextConnection" ) ) ) ;
76
-
77
75
var cnnString = Configuration . GetConnectionString ( "PSCContextConnection" ) ;
78
- services . AddDbContext < PSCContext > ( _ => _ . UseSqlServer ( cnnString ) ) ;
79
- services . ConfigureAudit ( cnnString ) ;
76
+ services . AddDbContext < ApplicationDbContext > ( _ => _ . UseSqlServer ( Configuration . GetConnectionString ( "ApplicationDbContextConnection" ) ) ) ;
80
77
#endregion
81
78
#region Dependency Injection
82
79
services . AddTransient < IEmailSender , EmailSender > ( ) ;
Original file line number Diff line number Diff line change 8
8
},
9
9
"AllowedHosts" : " *" ,
10
10
"ConnectionStrings" : {
11
- "ApplicationDbContextConnection" : " "
11
+ "ApplicationDbContextConnection" : " " ,
12
+ "PSCContextConnection" : " "
12
13
},
13
14
"SmtpCredentials" : {
14
15
"MailFrom" : " " ,
Original file line number Diff line number Diff line change @@ -19,8 +19,10 @@ public static class PersistenceServiceRegistration
19
19
{
20
20
public static IServiceCollection AddPersistenceServices ( this IServiceCollection services , IConfiguration configuration )
21
21
{
22
+ var cnnString = configuration . GetConnectionString ( "PSCContextConnection" ) ;
22
23
services . AddDbContext < PSCContext > ( options =>
23
- options . UseSqlServer ( configuration . GetConnectionString ( "GloboTicketTicketManagementConnectionString" ) ) ) ;
24
+ options . UseSqlServer ( cnnString ) ) ;
25
+ services . ConfigureAudit ( cnnString ) ;
24
26
25
27
services . AddScoped ( typeof ( IAsyncRepository < > ) , typeof ( BaseRepository < > ) ) ;
26
28
You can’t perform that action at this time.
0 commit comments