Exemplo n.º 1
0
 public Task <IPaymentTerm> DeletePaymentTermAsync(int number)
 {
     return(ExecuteAsync(async() =>
     {
         using PaymentTermModelHandler paymentTermModelHandler = new PaymentTermModelHandler(DbContext, AccountingModelConverter.Create());
         return await paymentTermModelHandler.DeleteAsync(number);
     },
                         MethodBase.GetCurrentMethod()));
 }
Exemplo n.º 2
0
 public Task <IEnumerable <IPaymentTerm> > GetPaymentTermsAsync()
 {
     return(ExecuteAsync(async() =>
     {
         using PaymentTermModelHandler paymentTermModelHandler = new PaymentTermModelHandler(DbContext, AccountingModelConverter.Create());
         return await paymentTermModelHandler.ReadAsync();
     },
                         MethodBase.GetCurrentMethod()));
 }
Exemplo n.º 3
0
        public Task <IPaymentTerm> UpdatePaymentTermAsync(IPaymentTerm paymentTerm)
        {
            NullGuard.NotNull(paymentTerm, nameof(paymentTerm));

            return(ExecuteAsync(async() =>
            {
                using PaymentTermModelHandler paymentTermModelHandler = new PaymentTermModelHandler(DbContext, AccountingModelConverter.Create());
                return await paymentTermModelHandler.UpdateAsync(paymentTerm);
            },
                                MethodBase.GetCurrentMethod()));
        }