浏览代码

Removed the Published checks on properties.

master
George Williams 5 年前
父节点
当前提交
b5c98b49fa
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8
    3
      UnivateProperties_API/Repository/Properties/PropertyRepository.cs

+ 8
- 3
UnivateProperties_API/Repository/Properties/PropertyRepository.cs 查看文件

502
         private List<PropertyDisplay> GetDisplayDetails(List<Property> props)
502
         private List<PropertyDisplay> GetDisplayDetails(List<Property> props)
503
         {
503
         {
504
             var properties = new List<PropertyDisplay>();
504
             var properties = new List<PropertyDisplay>();
505
-            props = props.Where(p => p.Published).ToList();
505
+            //Removed publish check for now
506
+            //props = props.Where(p => p.Published).ToList();
506
             foreach (var item in props)
507
             foreach (var item in props)
507
             {
508
             {
508
                 PropertyDisplay display = new PropertyDisplay
509
                 PropertyDisplay display = new PropertyDisplay
582
 
583
 
583
         public List<PropertyDisplay> GetLatestDisplay()
584
         public List<PropertyDisplay> GetLatestDisplay()
584
         {
585
         {
585
-            List<Property> props = GetAll().Where(x => x.Published).OrderByDescending(x => x.DatePublished).Take(3).ToList();
586
+            //Removed Published Check for now
587
+            //List<Property> props = GetAll().Where(x => x.Published).OrderByDescending(x => x.DatePublished).Take(3).ToList();
588
+            List<Property> props = GetAll().OrderByDescending(x => x.Created).Take(3).ToList();
586
             return GetDisplayDetails(props);
589
             return GetDisplayDetails(props);
587
         }
590
         }
588
 
591
 
619
 
622
 
620
         public List<PropertyList> GetPropertyList()
623
         public List<PropertyList> GetPropertyList()
621
         {
624
         {
622
-            return SetPropertyList(dBContext.Properties.Where(x => x.Published).ToList());
625
+            //Removed Published check for now
626
+            //return SetPropertyList(dBContext.Properties.Where(x => x.Published).ToList());
627
+            return SetPropertyList(dBContext.Properties.ToList());
623
         }
628
         }
624
 
629
 
625
         private List<PropertyList> SetPropertyList(List<Property> properties)
630
         private List<PropertyList> SetPropertyList(List<Property> properties)

正在加载...
取消
保存