public async Task CreateOrEdit(CreateOrEditPromulgatedDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
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); }
protected virtual async Task Update(CreateOrEditPromulgatedDto input) { var promulgated = await _promulgatedRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, promulgated); }