Beispiel #1
0
 public async Task CreateOrEdit(CreateOrEditJetDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Beispiel #2
0
        protected virtual async Task Create(CreateOrEditJetDto input)
        {
            var jet = ObjectMapper.Map <Jet>(input);


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


            await _jetRepository.InsertAsync(jet);
        }
Beispiel #3
0
        protected virtual async Task Update(CreateOrEditJetDto input)
        {
            var jet = await _jetRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, jet);
        }