public void Test_GetPersonBy() { var pErsOn = personCrudService.GetAll(); var personToFind = pErsOn.Last(); var person = personCrudService.GetPerson(personToFind.Id); Assert.AreEqual(personToFind.Id, person.Id); }
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); }