public ActionResult Add(ContactInformationRegisterModel modelContactInformation) { var myContactInformation = Mapper.Map <ContactInformation>(modelContactInformation); ContactInformation contactInformation = _contactInformationRepository.Create(myContactInformation); const string title = "Informacion Agregada"; _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.SuccessMessage); return(RedirectToAction("Details/" + contactInformation.People.Id, modelContactInformation.Controller)); }
public ActionResult Add(ContactInformationRegisterModel modelContactInformation) { var myContactInformation = new ContactInformation { Type = modelContactInformation.Type, Value = modelContactInformation.Value, People = _peopleRepository.GetById(modelContactInformation.Id) }; ContactInformation contactInformation = _contactInformationRepository.Create(myContactInformation); const string title = "Informacion Agregada"; _viewMessageLogic.SetNewMessage(title, "", ViewMessageType.SuccessMessage); return(RedirectToAction("Details/" + contactInformation.People.Id, modelContactInformation.Controller)); }