Exemplo n.º 1
0
 public IEnumerable <Condominium> List(CondominiumSearchParams search)
 {
     return(Condominiums
            .ApplySearch(search)
            .Select(x => x.ToModel())
            .ToList());
 }
Exemplo n.º 2
0
 public PagedResponse <Condominium> List([FromQuery] CondominiumSearchParams searchParams)
 {
     return(new PagedResponse <Condominium>
     {
         Values = CondominiumService.List(searchParams.ToModel()),
         MorePages = false
     });
 }
Exemplo n.º 3
0
 public IEnumerable <Condominium> List(CondominiumSearchParams search)
 {
     return(CondominiumRepository.List(search));
 }
Exemplo n.º 4
0
 public static IQueryable <Condominium> ApplySearch(this IQueryable <Condominium> query, CondominiumSearchParams searchParams)
 {
     if (searchParams.Name != null)
     {
         query = query
                 .Where(x => x.Name.Contains(searchParams.Name));
     }
     return(query);
 }