public static List <ECBViolationsSummaryByAgency> GetECBViolationsSummaryByAgency(string propertyBBL)
 {
     using (NYCVNLEntities nycvnlE = new NYCVNLEntities())
     {
         return(nycvnlE.ECBViolationsSummaryByAgencies.Where(m => m.BBL == propertyBBL).ToList());
     }
 }
 public static List <ECBViolationDetail> GetECBViolations(string propertyBBL, string active)
 {
     using (NYCVNLEntities nycvnlE = new NYCVNLEntities())
     {
         if (active.ToUpper() == "IGNORE")
         {
             return(Mapper.Map <List <MultiAgencyViolation>, List <ECBViolationDetail> >(nycvnlE.MultiAgencyViolations
                                                                                         .Where(i => i.BBL == propertyBBL)
                                                                                         .OrderByDescending(m => m.ViolationDate).ToList()));
         }
         else
         {
             if (active == "Y")
             {
                 return(Mapper.Map <List <MultiAgencyViolation>, List <ECBViolationDetail> >(nycvnlE.MultiAgencyViolations
                                                                                             .Where(i => i.BBL == propertyBBL &&
                                                                                                    i.HearingStatus != "WRITTEN OFF" &&
                                                                                                    i.HearingStatus != "PAID IN FULL")
                                                                                             .OrderByDescending(m => m.ViolationDate).ToList()));
             }
             else
             {
                 return(Mapper.Map <List <MultiAgencyViolation>, List <ECBViolationDetail> >(nycvnlE.MultiAgencyViolations
                                                                                             .Where(i => i.BBL == propertyBBL &&
                                                                                                    (i.HearingStatus == "WRITTEN OFF" ||
                                                                                                     i.HearingStatus == "PAID IN FULL"))
                                                                                             .OrderByDescending(m => m.ViolationDate).ToList()));
             }
         }
     }
 }
 public static ECBViolationsSummary GetECBViolationsSummary(string propertyBBL)
 {
     using (NYCVNLEntities nycvnlE = new NYCVNLEntities())
     {
         return(nycvnlE.ECBViolationsSummaries.Find(propertyBBL));
     }
 }