protected virtual async Task Create(CreateOrEditLabelDto input) { var label = ObjectMapper.Map <Label>(input); await _labelRepository.InsertAsync(label); }
public async Task CreateOrEdit(CreateOrEditLabelDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditLabelDto input) { var label = await _labelRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, label); }