Ejemplo n.º 1
0
        public List <Postavke> Get(PostavkeSearchRequest request)
        {
            var query = _context.Postavke.AsQueryable().Include(c => c.Korisnici);

            if (!string.IsNullOrWhiteSpace(request?.Naziv))
            {
                query = query.Where(x => x.Naziv.StartsWith(request.Naziv)).Include(c => c.Korisnici);
            }



            var list = query.ToList();

            return(_mapper.Map <List <Model.Postavke> >(list));
        }
Ejemplo n.º 2
0
 public List <Model.Postavke> Get([FromQuery] PostavkeSearchRequest request)
 {
     return(_postavkeService.Get(request));
 }