コード例 #1
0
        public async Task <List <ComponentDto> > BrowseAsync(BrowseComponents query)
        {
            var list = await _repository.BrowseAsync();

            if (!string.IsNullOrWhiteSpace(query.Name))
            {
                list = list.Where(x => x.Name.ToLower().Contains(query.Name.ToLower()));
            }

            return(_mapper.Map <List <ComponentDto> >(list.ToList()));
        }