Example #1
0
 public async Task CreateOrEdit(CreateOrEditBillingEventDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Example #2
0
        protected virtual async Task Create(CreateOrEditBillingEventDto input)
        {
            var billingEvent = ObjectMapper.Map <BillingEvent>(input);


            if (AbpSession.TenantId != null)
            {
                billingEvent.TenantId = (int?)AbpSession.TenantId;
            }


            await _billingEventRepository.InsertAsync(billingEvent);
        }
Example #3
0
        protected virtual async Task Update(CreateOrEditBillingEventDto input)
        {
            var billingEvent = await _billingEventRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, billingEvent);
        }