protected virtual async Task Create(CreateOrEditVanbanDto input) { var vanban = ObjectMapper.Map <Vanban>(input); await _vanbanRepository.InsertAsync(vanban); }
public async Task CreateOrEdit(CreateOrEditVanbanDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditVanbanDto input) { var vanban = await _vanbanRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, vanban); }