示例#1
0
        // GET: OwnerController/Details/5
        public ActionResult Details(int id)
        {
            Owner         owner   = _ownerRepo.GetOwnerById(id);
            List <Dog>    dogs    = _dogRepo.GetAllDogsByOwnerId(owner.Id);
            List <Walker> walkers = _walkerRepo.GetWalkersInNeighborhood(owner.NeighborhoodId);



            ProfileViewModel vm = new ProfileViewModel()
            {
                Owner   = owner,
                Dogs    = dogs,
                Walkers = walkers
            };

            return(View(vm));
        }