protected virtual async Task Create(CreateOrEditLocationCredentialDto input) { var locationCredential = ObjectMapper.Map <LocationCredential>(input); await _locationCredentialRepository.InsertAsync(locationCredential); }
public async Task CreateOrEdit(CreateOrEditLocationCredentialDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
protected virtual async Task Update(CreateOrEditLocationCredentialDto input) { var locationCredential = await _locationCredentialRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, locationCredential); }