diff --git a/BankYouBankrupt/BankYouBankruptDatabaseImplement/BankYouBancruptDatabase.cs b/BankYouBankrupt/BankYouBankruptDatabaseImplement/BankYouBancruptDatabase.cs index 15c14f8..eebafe2 100644 --- a/BankYouBankrupt/BankYouBankruptDatabaseImplement/BankYouBancruptDatabase.cs +++ b/BankYouBankrupt/BankYouBankruptDatabaseImplement/BankYouBancruptDatabase.cs @@ -15,9 +15,15 @@ namespace BankYouBankruptDatabaseImplement { if (!optionsBuilder.IsConfigured) { - //optionsBuilder.UseSqlServer(@"Data Source=SHADOWIK\SHADOWIK;Initial Catalog=BankYouBankrupt;Integrated Security=True;TrustServerCertificate=True"); - optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-CFLH20EE\SQLEXPRESS;Initial Catalog=BankYouBankrupt;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); - } + if (System.Environment.MachineName == "SHADOWIK") + { + optionsBuilder.UseSqlServer(@"Data Source=SHADOWIK\SHADOWIK;Initial Catalog=BankYouBankrupt;Integrated Security=True;TrustServerCertificate=True"); + } + else + { + optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-CFLH20EE\SQLEXPRESS;Initial Catalog=BankYouBankrupt;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True"); + } + } base.OnConfiguring(optionsBuilder); } public virtual DbSet Accounts { set; get; }