File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed
IdentityServer/OpenIddict/ClassifiedAds.Migrator
Monolith/ClassifiedAds.Migrator Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 2929 options . UseSqlServer ( configuration [ "ConnectionStrings:IdentityServer" ] , sql =>
3030 {
3131 sql . MigrationsAssembly ( Assembly . GetExecutingAssembly ( ) . GetName ( ) . Name ) ;
32+
33+ if ( int . TryParse ( configuration [ "CommandTimeout" ] , out var commandTimeout ) )
34+ {
35+ sql . CommandTimeout ( commandTimeout ) ;
36+ }
3237 } ) ;
3338
3439 // Register the entity sets needed by OpenIddict.
Original file line number Diff line number Diff line change 22 "ConnectionStrings" : {
33 "IdentityServer" : " Server=127.0.0.1;Database=ClassifiedAds.IdentityServer.OpenIddict;User Id=sa;Password=sqladmin123!@#;MultipleActiveResultSets=true;Encrypt=False"
44 },
5+ "CommandTimeout" : " 30" ,
56 "CheckDependency" : {
67 "Enabled" : false ,
78 "Host" : " localhost:1433"
Original file line number Diff line number Diff line change 2929 services . AddDbContext < AdsDbContext > ( options => options . UseSqlServer ( configuration [ "ConnectionStrings:ClassifiedAds" ] , sql =>
3030 {
3131 sql . MigrationsAssembly ( Assembly . GetExecutingAssembly ( ) . GetName ( ) . Name ) ;
32+
33+ if ( int . TryParse ( configuration [ "CommandTimeout" ] , out var commandTimeout ) )
34+ {
35+ sql . CommandTimeout ( commandTimeout ) ;
36+ }
3237 } ) ) ;
3338} ) ;
3439
Original file line number Diff line number Diff line change 22 "ConnectionStrings" : {
33 "ClassifiedAds" : " Server=127.0.0.1;Database=ClassifiedAds;User Id=sa;Password=sqladmin123!@#;MultipleActiveResultSets=true;Encrypt=False"
44 },
5+ "CommandTimeout" : " 30" ,
56 "CheckDependency" : {
67 "Enabled" : false ,
78 "Host" : " localhost:1433"
1011 "LogLevel" : {
1112 "Default" : " Information"
1213 }
13- },
14- "AllowedHosts" : " *"
14+ }
1515}
You can’t perform that action at this time.
0 commit comments