public PersonDetailModel GetById(Guid id) { using (var context = new MyPhotoDbContext()) { return(_mapper.MapToDetail(context.Persons.Find(id))); } }