Beispiel #1
0
        public IList <Model.Worker> GetAll(WorkerSearchRequest request)
        {
            var query = _context.Worker.AsQueryable();

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

            var list = query.ToList();

            return(_mapper.Map <IList <Model.Worker> >(list));
        }
Beispiel #2
0
 public IList <Worker> GetAll([FromQuery] WorkerSearchRequest request)
 {
     return(_service.GetAll(request));
 }