This commit is contained in:
maxnes3 2023-05-06 00:21:49 +04:00
parent 7169347a45
commit 7716a6c367
2 changed files with 1 additions and 4 deletions

View File

@ -22,9 +22,6 @@ namespace PersonnelDepartmentDatabaseImplement.Implements
try
{
using var context = new PersonnelDepartmentDatabase();
/*var list = context.Deals.ToList();
context.Deals.RemoveRange(list);
context.SaveChanges();*/
var tableName = context.Model.FindEntityType(typeof(Deal)).GetTableName();
context.Database.ExecuteSqlRaw($"DELETE FROM \"{ tableName }\"");
}

View File

@ -15,7 +15,7 @@ namespace PersonnelDepartmentDatabaseImplement
{
if (optionsBuilder.IsConfigured == false)
{
optionsBuilder.UseNpgsql(@"Host=192.168.0.102;Port=5432;Database=PersonnelDepartment;Username=postgres;Password=postgres");
optionsBuilder.UseNpgsql(@"Host=192.168.0.103;Port=5432;Database=PersonnelDepartment;Username=postgres;Password=postgres");
}
base.OnConfiguring(optionsBuilder);
}