File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public static void Main(string[] args) {
2020 . AddEntityFrameworkSqlServer ( )
2121 . AddDbContext < NorthwindContext > ( options => options
2222 //.UseSqlServer("Server=.\\SQLEXPRESS; Database=Northwind; Trusted_Connection=True")
23- . UseSqlServer ( "Data Source=(localdb) \\ MSSQLLocalDB; Database=Northwind; Integrated Security=True; MultipleActiveResultSets=True; App=EntityFramework" )
23+ . UseSqlServer ( builder . Configuration . GetConnectionString ( "NorthwindConnectionString" ) )
2424 ) ;
2525
2626 var app = builder . Build ( ) ;
Original file line number Diff line number Diff line change 1+ {
2+ "ConnectionStrings" : {
3+ "NorthwindConnectionString" : " Data Source=(localdb)\\ MSSQLLocalDB; Database=Northwind; Integrated Security=True; MultipleActiveResultSets=True; App=EntityFramework" ,
4+ "NorthwindConnectionStringIis" : " Data Source=.; Database=Northwind; User Id=; Password=; MultipleActiveResultSets=True; App=EntityFramework; TrustServerCertificate=True"
5+ }
6+ }
You can’t perform that action at this time.
0 commit comments