diff --git a/BusinessLogic/BusinessLogic.csproj b/BusinessLogic/BusinessLogic.csproj index 0b64d35..c307385 100644 --- a/BusinessLogic/BusinessLogic.csproj +++ b/BusinessLogic/BusinessLogic.csproj @@ -6,6 +6,10 @@ enable + + + + diff --git a/TransportGuide/App.config b/TransportGuide/App.config new file mode 100644 index 0000000..e4f720d --- /dev/null +++ b/TransportGuide/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/TransportGuide/TransportGuide.csproj b/TransportGuide/TransportGuide.csproj index 571db5b..b38c828 100644 --- a/TransportGuide/TransportGuide.csproj +++ b/TransportGuide/TransportGuide.csproj @@ -14,6 +14,7 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/TransportGuideContracts/TransportGuideContracts.csproj b/TransportGuideContracts/TransportGuideContracts.csproj index 0e60d27..f8148fd 100644 --- a/TransportGuideContracts/TransportGuideContracts.csproj +++ b/TransportGuideContracts/TransportGuideContracts.csproj @@ -6,6 +6,10 @@ enable + + + + diff --git a/TransportGuideDataModels/TransportGuideDataModels.csproj b/TransportGuideDataModels/TransportGuideDataModels.csproj index e3cec15..17c1974 100644 --- a/TransportGuideDataModels/TransportGuideDataModels.csproj +++ b/TransportGuideDataModels/TransportGuideDataModels.csproj @@ -8,6 +8,7 @@ + diff --git a/TransportGuideDatabaseImplements/TransportGuideDB.cs b/TransportGuideDatabaseImplements/TransportGuideDB.cs index f47871f..fbbdc98 100644 --- a/TransportGuideDatabaseImplements/TransportGuideDB.cs +++ b/TransportGuideDatabaseImplements/TransportGuideDB.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Configuration; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -11,12 +12,14 @@ namespace TransportGuideDatabaseImplements { public class TransportGuideDB : DbContext { + string dbName = ConfigurationManager.AppSettings["connectToDb"]; + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { if (optionsBuilder.IsConfigured == false) { - optionsBuilder.UseNpgsql("Host=192.168.56.101;Port=5432;Database=TransportSubd;Username=postgres;Password=1502"); + optionsBuilder.UseNpgsql(dbName); } base.OnConfiguring(optionsBuilder); } diff --git a/TransportGuideDatabaseImplements/TransportGuideDatabaseImplements.csproj b/TransportGuideDatabaseImplements/TransportGuideDatabaseImplements.csproj index 609bab5..3781eda 100644 --- a/TransportGuideDatabaseImplements/TransportGuideDatabaseImplements.csproj +++ b/TransportGuideDatabaseImplements/TransportGuideDatabaseImplements.csproj @@ -13,6 +13,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive +