diff --git a/HanyadikHetVan/Startup.cs b/HanyadikHetVan/Startup.cs index 29c4cba..a89e83a 100644 --- a/HanyadikHetVan/Startup.cs +++ b/HanyadikHetVan/Startup.cs @@ -33,8 +33,8 @@ namespace HanyadikHetVan public void ConfigureServices(IServiceCollection services) { services.AddDbContext(options => - options.UseSqlServer( - Configuration.GetConnectionString("DefaultConnection"))); + options.UseNpgsql( + Configuration.GetConnectionString("PostgreSQLConnection"))); services.AddAutoMapper(Assembly.GetExecutingAssembly()); services.AddTransient(); services.AddTransient(); diff --git a/HanyadikHetVan/appsettings.json b/HanyadikHetVan/appsettings.json index 54174b4..cd4ea64 100644 --- a/HanyadikHetVan/appsettings.json +++ b/HanyadikHetVan/appsettings.json @@ -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",