public IHttpActionResult GetById(int personId)
        {
            Rp3.Test.Common.Models.Person commonModel = null;
            using (DataService service = new DataService())
            {
                var model = service.Persons.GetByID(personId);

                commonModel = new Common.Models.Person()
                {
                    Active         = model.Active,
                    PersonId       = model.PersonId,
                    Name           = model.Name,
                    Identification = model.Identification
                };
            }
            return(Ok(commonModel));
        }
Пример #2
0
 public static API.PersonAPIModal MapApiPerson(Common.Models.Person person)
 {
     return(new API.PersonAPIModal {
         FirstName = person.FirstName, LastName = person.LastName
     });
 }