private async void TxtPretraga_TextChanged(object sender, EventArgs e)
        {
            var search = new UredSearchRequest
            {
                Naziv = txtPretraga.Text
            };

            var result = await _aPIService.Get <List <Model.Ured> >(search);

            dgvUred.DataSource = result;
        }
Esempio n. 2
0
        public List <Ured> Get(UredSearchRequest request)
        {
            var query = _context.Uredi.AsQueryable();

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

            query = query.Where(p => p.IsDeleted == false);
            var list = query.ToList();

            return(_mapper.Map <List <Model.Ured> >(list));
        }
Esempio n. 3
0
 public List <Model.Ured> Get([FromQuery] UredSearchRequest request)
 {
     return(_uredService.Get(request));
 }