Exemplo n.º 1
0
 public async Task CreateOrEdit(CreateOrEditPaymentMethodDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Exemplo n.º 2
0
        protected virtual async Task Update(CreateOrEditPaymentMethodDto input)
        {
            var paymentMethod = await _paymentMethodRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, paymentMethod);
        }
Exemplo n.º 3
0
        protected virtual async Task Create(CreateOrEditPaymentMethodDto input)
        {
            var paymentMethod = ObjectMapper.Map <PaymentMethod>(input);

            await _paymentMethodRepository.InsertAsync(paymentMethod);
        }