public ActionResult Index() { int ownerId = GetCurrentUserId(); List <Dog> dogs = _dogRepo.GetDogsByOwner(ownerId); return(View(dogs)); }
// GET: OwnerController/Details/5 public ActionResult Details(int id) { Owner owner = _ownerRepo.GetOwnerById(id); if (owner == null) { return(NotFound()); } List <Dog> dogs = _dogRepo.GetDogsByOwner(owner.Id); List <Walker> walkers = _walkerRepo.GetWalkersInNeighborhood(owner.NeighborhoodId); ProfileViewModel vm = new ProfileViewModel() { Owner = owner, Dogs = dogs, Walkers = walkers }; return(View(vm)); }