Add House Menu

This commit is contained in:
hydrant
2019-07-28 20:43:23 +02:00
parent f86bbe01c6
commit 5b9c08011e
12 changed files with 1686 additions and 12 deletions

View File

@@ -2499,6 +2499,13 @@ namespace ReallifeGamemode.Server.Commands
return;
}
if(nearHouse.OwnerId != null)
{
dbContext.Users.Where(u => u.Id == nearHouse.OwnerId).First().HouseId = null;
}
dbContext.SaveChanges();
dbContext.Houses.Remove(nearHouse);
dbContext.SaveChanges();