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); }
public static Currency ToEntity(this CurrencyModel model, Currency destination) { return(model.MapTo(destination)); }
public static Currency ToEntity(this CurrencyModel model) { return(model.MapTo <CurrencyModel, Currency>()); }