From 6bada56f5848bc111a7fdc55a11f39940ce3ebc5 Mon Sep 17 00:00:00 2001 From: shadowik Date: Wed, 17 May 2023 01:08:27 +0400 Subject: [PATCH] =?UTF-8?q?=D0=AF=20=D0=A1=D0=94=D0=95=D0=9B=D0=90=D0=9B?= =?UTF-8?q?=20=D0=A3=D0=9D=D0=98=D0=92=D0=95=D0=A0=D0=A1=D0=90=D0=9B=D0=AC?= =?UTF-8?q?=D0=9D=D0=AB=D0=99=20=D0=92=D0=A5=D0=9E=D0=94=20=D0=94=D0=9B?= =?UTF-8?q?=D0=AF=20=D0=91=D0=94,=20=D0=98=20=D0=92=D0=A1=D0=95=D0=93?= =?UTF-8?q?=D0=9E=20=D0=9E=D0=94=D0=9D=D0=90=20=D0=A1=D0=A2=D0=A0=D0=9E?= =?UTF-8?q?=D0=A7=D0=9A=D0=90,=20=D0=9F=D0=9E=D0=A7=D0=95=D0=9C=D0=A3=20?= =?UTF-8?q?=D0=9C=D0=AB=20=D0=9D=D0=95=20=D0=94=D0=9E=D0=94=D0=A3=D0=9C?= =?UTF-8?q?=D0=90=D0=9B=D0=98=D0=A1=D0=AC=20=D0=A0=D0=90=D0=9D=D0=AC=D0=A8?= =?UTF-8?q?=D0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BankYouBancruptDatabase.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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; }