private Api.BusinessLogic.Contact MapDbEntityToBusinessObject(Api.Database.Contact sourceContact) { var destContact = new Api.BusinessLogic.Contact(); destContact.Id = sourceContact.Id; destContact.FirstName = sourceContact.FirstName; destContact.LastName = sourceContact.LastName; destContact.Email = sourceContact.Email; destContact.PhoneNumber = sourceContact.PhoneNumber; destContact.SelectedStatus = sourceContact.Status; return(destContact); }
public Api.BusinessLogic.Contact CreateContact([FromBody] string value) { var contact = JsonConvert.DeserializeObject <Contact>(value); var serviceContact = new Api.BusinessLogic.Contact() { FirstName = contact.FirstName, LastName = contact.LastName, Email = contact.Email, PhoneNumber = contact.PhoneNumber, SelectedStatus = contact.Status }; var result = _manager.CreateContact(serviceContact); return(result); }