public PaginatedResults <PersonDto> GetAll(PaginationOptions options) { DelayService.Pause(); var results = _peopleRepository.GetAll().ToList(); return(_paginationService.GetPaginatedResults <Person, PersonDto>(results, options)); }
public PaginatedResults <PersonDto> GetPeopleByName(string name, PaginationOptions options) { DelayService.Pause(); var people = _peopleRepository.GetByName(name); return(_paginationService.GetPaginatedResults <Person, PersonDto>(people, options)); }
public PersonDto CreatePerson(PersonDto muppet) { var entity = _mapper.Map <Person>(muppet); DelayService.Pause(); return(_mapper.Map <PersonDto>(_peopleRepository.CreatePerson(entity))); }
public PersonDto UpdatePerson(PersonDto update) { var entity = _mapper.Map <Person>(update); if (update.Interests == null) { entity.Interests = null; } DelayService.Pause(); var updatedPerson = _peopleRepository.UpdatePerson(entity); return(_mapper.Map <PersonDto>(updatedPerson)); }
public PersonDto DeletePerson(int id) { DelayService.Pause(); return(_mapper.Map <PersonDto>(_peopleRepository.DeletePerson(id))); }
public PersonDto GetPersonById(int id) { DelayService.Pause(); return(_mapper.Map <PersonDto>(_peopleRepository.GetPersonById(id))); }