Show house owner name when house has owner
This commit is contained in:
@@ -83,12 +83,12 @@ namespace ReallifeGamemode.Server.Managers
|
||||
{
|
||||
using (dbContext = new DatabaseContext())
|
||||
{
|
||||
return dbContext.Houses.Where(h => h.Id == id).FirstOrDefault();
|
||||
return dbContext.Houses.Where(h => h.Id == id).Include(h => h.Owner).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return dbContext.Houses.Where(h => h.Id == id).FirstOrDefault();
|
||||
return dbContext.Houses.Where(h => h.Id == id).Include(h => h.Owner).FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace ReallifeGamemode.Server.Managers
|
||||
|
||||
var newHouse = new
|
||||
{
|
||||
OwnerName = house.Owner?.Name,
|
||||
house.RentalFee,
|
||||
house.Price,
|
||||
house.Type,
|
||||
|
||||
Reference in New Issue
Block a user