fix
This commit is contained in:
parent
7169347a45
commit
7716a6c367
@ -22,9 +22,6 @@ namespace PersonnelDepartmentDatabaseImplement.Implements
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var context = new PersonnelDepartmentDatabase();
|
using var context = new PersonnelDepartmentDatabase();
|
||||||
/*var list = context.Deals.ToList();
|
|
||||||
context.Deals.RemoveRange(list);
|
|
||||||
context.SaveChanges();*/
|
|
||||||
var tableName = context.Model.FindEntityType(typeof(Deal)).GetTableName();
|
var tableName = context.Model.FindEntityType(typeof(Deal)).GetTableName();
|
||||||
context.Database.ExecuteSqlRaw($"DELETE FROM \"{ tableName }\"");
|
context.Database.ExecuteSqlRaw($"DELETE FROM \"{ tableName }\"");
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ namespace PersonnelDepartmentDatabaseImplement
|
|||||||
{
|
{
|
||||||
if (optionsBuilder.IsConfigured == false)
|
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);
|
base.OnConfiguring(optionsBuilder);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user