Exemple #1
0
 public async Task CreateOrEdit(CreateOrEditPromulgatedDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
Exemple #2
0
        protected virtual async Task Create(CreateOrEditPromulgatedDto input)
        {
            var promulgated = ObjectMapper.Map <Promulgated>(input);


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


            await _promulgatedRepository.InsertAsync(promulgated);
        }
Exemple #3
0
        protected virtual async Task Update(CreateOrEditPromulgatedDto input)
        {
            var promulgated = await _promulgatedRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, promulgated);
        }