Ejemplo n.º 1
0
        public async Task <List <EmlakBinaYasiResponse> > SearchAsync(BinaYasiSearchRequest request)
        {
            return(await base.ExecuteWithExceptionHandledOperation(async() =>
            {
                if (request.take == 0)
                {
                    request.take = ConfigurationHelper.DefaultTakeListMinCount;
                }
                var search = _EmlakBinaYasiRepostory.GetAll(request.skip, request.take);
                if (!string.IsNullOrEmpty(request.ProductName))
                {
                    search = search.Where(x => x.BinaYasi.Contains(request.ProductName));
                }

                return Mapper.Map <List <EmlakBinaYasiResponse> >(await search.ToListAsync());
            }));
        }
Ejemplo n.º 2
0
 public Task <List <EmlakBinaYasiResponse> > Search([FromUri] BinaYasiSearchRequest request)
 {
     return(_emlakBinaYasiEngine.SearchAsync(request));
 }