public async Task <PersonRelationDTO> AddContact(PersonRelationDTO model) { var contact = new PersonRelation { PersonID = model.PersonID, ContactID = model.ContactID, PersonTypeID = model.PersonTypeID }; _uow.PersonRelations.Insert(contact); _uow.Save(); return(_mapper.Map <PersonRelationDTO>(contact)); }
public async Task <ActionResult <PersonRelationDTO> > AddContact([FromBody] PersonRelationDTO model) => await _service.AddContact(model);