Beispiel #1
0
        public ListResultDto <CurrencyListDto> GetCurrency(GetCurrencyInput input)
        {
            var Currency = _CurrencyRepository
                           .GetAll()
                           .WhereIf(
                !input.Filter.IsNullOrEmpty(),
                p => p.Name.Contains(input.Filter) ||
                p.Code.Contains(input.Filter)
                )
                           .OrderBy(p => p.Name)
                           .ThenBy(p => p.Code)
                           .ToList();

            return(new ListResultDto <CurrencyListDto>(Currency.MapTo <List <CurrencyListDto> >()));
        }
Beispiel #2
0
 public CurrencyDto GetCurrency(GetCurrencyInput input)
 {
     return(Mapper.Map <CurrencyDto>(_currencyRepository.Get(input.CurrencyId)));
 }