public async Task CreateOrEdit(CreateOrEditBillingEventDetailDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
        protected virtual async Task Create(CreateOrEditBillingEventDetailDto input)
        {
            var billingEventDetail = ObjectMapper.Map <BillingEventDetail>(input);


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


            await _billingEventDetailRepository.InsertAsync(billingEventDetail);
        }
        protected virtual async Task Update(CreateOrEditBillingEventDetailDto input)
        {
            var billingEventDetail = await _billingEventDetailRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, billingEventDetail);
        }