public List <problem> SearchListProblem(FilterModel filter) { return(ProblemRepository.FindBy(p => p.status != 2 && (filter.FromDate <= p.created_date && p.created_date <= filter.ToDate) && (Equals(filter.Address, null) || p.apartment.address.Contains(filter.Address)) && (Equals(filter.Building, null) || p.apartment.building.Contains(filter.Building)) && (Equals(filter.NoApartment, null) || p.apartment.no_apartment.Contains(filter.NoApartment)) && (filter.ProjectId == -1 || p.apartment.project_id == filter.ProjectId) && (filter.Type == -1 || p.issue_id == filter.Type)).Include(p => p.apartment.project.project_content).Include(p => p.contract.user_profile1.user_profile_note).Include(p => p.problem_image).Include(p => p.problem_tracking).OrderByDescending(p => p.problem_id).ToList()); }
public problem GetProblemById(int id) { return(ProblemRepository.FindBy(p => p.problem_id == id).FirstOrDefault()); }