Example #1
0
        public void Test_GetPersonBy()

        {
            var pErsOn = personCrudService.GetAll();

            var personToFind = pErsOn.Last();

            var person = personCrudService.GetPerson(personToFind.Id);

            Assert.AreEqual(personToFind.Id, person.Id);
        }
Example #2
0
        public PersonModel GetPerson(int id)

        {
            var personCrudService = new PersonCrudService();

            var person = personCrudService.GetPerson(id);

            PersonModel PersonFromDomain = null;

            if (person != null)
            {
                PersonFromDomain = PersonModel.FromDomain(person);
            }

            return(PersonFromDomain);
        }