Exemple #1
0
        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));
        }
Exemple #2
0
 public async Task <ActionResult <PersonRelationDTO> > AddContact([FromBody] PersonRelationDTO model) => await _service.AddContact(model);