Ejemplo n.º 1
0
        public async Task <bool> SaveCurrency(CurrencyModel model)
        {
            var entity = model.MapTo <Currency>();

            if (model.Id < 1)
            {
                await _currencyRepository.Insert(entity);
            }
            else
            {
                await _currencyRepository.Update(entity);
            }

            return(true);
        }
Ejemplo n.º 2
0
 public static Currency ToEntity(this CurrencyModel model, Currency destination)
 {
     return(model.MapTo(destination));
 }
Ejemplo n.º 3
0
 public static Currency ToEntity(this CurrencyModel model)
 {
     return(model.MapTo <CurrencyModel, Currency>());
 }