add postgres support
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Torma Kristóf 2021-06-08 17:03:59 +02:00
parent 31cc20d885
commit 552f90b424
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047
2 changed files with 4 additions and 3 deletions

View File

@ -33,8 +33,8 @@ namespace HanyadikHetVan
public void ConfigureServices(IServiceCollection services)
{
services.AddDbContext<ApplicationDbContext>(options =>
options.UseSqlServer(
Configuration.GetConnectionString("DefaultConnection")));
options.UseNpgsql(
Configuration.GetConnectionString("PostgreSQLConnection")));
services.AddAutoMapper(Assembly.GetExecutingAssembly());
services.AddTransient<WeeklyTimeSpanService>();
services.AddTransient<PauseService>();

View File

@ -1,7 +1,8 @@
{
"AllowedHosts": "*",
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-HanyadikHetVan-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true"
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-HanyadikHetVan-53bc9b9d-9d6a-45d4-8429-2a2761773502;Trusted_Connection=True;MultipleActiveResultSets=true",
"PostgreSQLConnection": "User ID=hanyadikhetvan;Password=05acd81c-761a-4fb3-93ae-023281a88b73;Server=192.168.42.4;Port=5432;Database=hanyadikhetvan;Integrated Security=true;Pooling=true;"
},
"DefaultAdministrator": {
"UserName": "testuser",