示例#1
0
        public IEnumerable <State> Search(SearchInputBase input)
        {
            var parameters = new
            {
                CreateDateStart = input.CreateDateInterval?.Start,
                CreateDateEnd   = input.CreateDateInterval?.End,
                UpdateDateStart = input.UpdateDateInterval?.Start,
                UpdateDateEnd   = input.UpdateDateInterval?.End,
                QueryText       = input.QueryText
            };

            return(base.Search(parameters));
        }
 public ActionResult <List <ViewModels.Category> > Search(SearchInputBase input)
 {
     try
     {
         var dataModels = _repository.Search(input);
         var viewModels = _mapper.Map <List <ViewModels.Category> >(dataModels);
         return(viewModels);
     }
     catch (Exception ex)
     {
         var messageResponse = _errorGenerator.GetMessageResponse <DataModels.Category, SearchInputBase>(ActionType.List, input, ex);
         Log.Error(messageResponse.LogTemplate, messageResponse.Message, input);
         throw new Exception(messageResponse.Message);
     }
 }