|
@@ -561,16 +561,16 @@ namespace UnivateProperties_API.Repository.Properties
|
561
|
561
|
if (Type.ToUpper() == "MY")
|
562
|
562
|
{
|
563
|
563
|
if (individual != null)
|
564
|
|
- properties = Get(x => x.OwnerId == individual.Id);
|
|
564
|
+ properties = dBContext.Properties.Include("City").Include("Suburb").Where(x => x.OwnerId == individual.Id).ToList();
|
565
|
565
|
if (agent != null)
|
566
|
|
- properties = Get(x => x.AgentId == agent.Id);
|
|
566
|
+ properties = dBContext.Properties.Include("City").Include("Suburb").Where(x => x.AgentId == agent.Id).ToList();
|
567
|
567
|
}
|
568
|
568
|
else
|
569
|
569
|
{
|
570
|
570
|
if (individual != null)
|
571
|
|
- properties = Get(x => x.OwnerId == individual.Id);
|
|
571
|
+ properties = dBContext.Properties.Include("City").Include("Suburb").Where(x => x.OwnerId == individual.Id).ToList();
|
572
|
572
|
if (agent != null)
|
573
|
|
- properties = Get(x => x.AgencyId == agent.AgencyId);
|
|
573
|
+ properties = dBContext.Properties.Include("City").Include("Suburb").Where(x => x.AgencyId == agent.AgencyId).ToList();
|
574
|
574
|
}
|
575
|
575
|
|
576
|
576
|
List<PropertyList> list = new List<PropertyList>();
|
|
@@ -583,7 +583,8 @@ namespace UnivateProperties_API.Repository.Properties
|
583
|
583
|
Name = string.IsNullOrEmpty(p.PropertyName) ? p.ShortDescription : p.PropertyName,
|
584
|
584
|
Price = string.Format("R {0:n}", p.Price),
|
585
|
585
|
Publish = p.Published.ToString(),
|
586
|
|
- Type = dBContext.PropertyTypes.Find(p.PropertyTypeId)?.Description
|
|
586
|
+ Type = dBContext.PropertyTypes.Find(p.PropertyTypeId)?.Description,
|
|
587
|
+ CarouselDescription = string.Format("{0}, {1} <br/>{2}", p.Suburb.Description, p.City.Description, p.AddressLine3)
|
587
|
588
|
};
|
588
|
589
|
|
589
|
590
|
prop.Size = (from u in dBContext.PropertyUserFields
|