private async Task Create(CreateOrEditContactPersonDto input) { var contactPerson = ObjectMapper.Map <ContactPerson>(input); await _contactPersonRepository.InsertAsync(contactPerson); }
public async Task CreateOrEdit(CreateOrEditContactPersonDto input) { if (input.Id == null) { await Create(input); } else { await Update(input); } }
private async Task Update(CreateOrEditContactPersonDto input) { var contactPerson = await _contactPersonRepository.FirstOrDefaultAsync((int)input.Id); ObjectMapper.Map(input, contactPerson); }