protected virtual async Task Create(CreateOrEditPbSubjectEducationDto input) { var pbSubjectEducation = ObjectMapper.Map <PbSubjectEducation>(input); await _pbSubjectEducationRepository.InsertAsync(pbSubjectEducation); }
public async Task CreateOrEdit(CreateOrEditPbSubjectEducationDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditPbSubjectEducationDto input) { var pbSubjectEducation = await _pbSubjectEducationRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, pbSubjectEducation); }