소스 검색

Removed the Published checks on properties.

master
George Williams 4 년 전
부모
커밋
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)

Loading…
취소
저장