Esempio n. 1
0
 public async Task CreateOrEdit(CreateOrEditLeaseAgreementDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Esempio n. 2
0
        protected virtual async Task Create(CreateOrEditLeaseAgreementDto input)
        {
            var leaseAgreement = ObjectMapper.Map <LeaseAgreement>(input);


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


            await _leaseAgreementRepository.InsertAsync(leaseAgreement);
        }
Esempio n. 3
0
        protected virtual async Task Update(CreateOrEditLeaseAgreementDto input)
        {
            var leaseAgreement = await _leaseAgreementRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, leaseAgreement);
        }