From cb574b501069d2059082be0b9ed845bfa2dbab6c Mon Sep 17 00:00:00 2001 From: Mahendra Date: Thu, 22 Feb 2024 11:38:47 +0530 Subject: [PATCH] enhancement: added db name (#6) --- .../Infrastructure/Data/DatabaseContextFactory.cs.tmpl | 2 +- .../MicroServiceName/appsettings.json.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl b/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl index 157bed6..2621cfc 100644 --- a/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl +++ b/frameworks/dotnet-clean-architecture/Infrastructure/Data/DatabaseContextFactory.cs.tmpl @@ -8,7 +8,7 @@ namespace Infrastructure.Data public DatabaseContext CreateDbContext(string[] args) { var optionsBuilder = new DbContextOptionsBuilder(); - optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog = {{.MicroServiceName }};User Id=*****;Password=*****;TrustServerCertificate=True;"); + optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog = {{.DataBaseName }};User Id=*****;Password=*****;TrustServerCertificate=True;"); return new DatabaseContext(optionsBuilder.Options); } } diff --git a/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl b/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl index 2551f16..7aa13b6 100644 --- a/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl +++ b/frameworks/dotnet-clean-architecture/MicroServiceName/appsettings.json.tmpl @@ -7,7 +7,7 @@ }, "AllowedHosts": "*", "ConnectionStrings": { - "ConnectionString": "Data Source=localhost,1433;Initial Catalog={{.MicroServiceName }};User Id=sa;Password=Test@123;TrustServerCertificate=True;" + "ConnectionString": "Data Source=localhost,1433;Initial Catalog={{.DataBaseName }};User Id=sa;Password=Test@123;TrustServerCertificate=True;" }, "Otel": { "ServiceName": "{{.MicroServiceName}}",