Пример #1
0
        // GET: HomeController1/Details/5
        public ActionResult Details(int id)
        {
            Owner         owner   = _ownerRepo.GetOwnerById(id);
            List <Dog>    dogs    = _dogRepo.GetDogsByOwnerId(owner.Id);
            List <Walker> walkers = _walkerRepo.GetWalkersByNeighborhoodId(owner.NeighborhoodId);

            OwnerProfileViewModel profileVM = new OwnerProfileViewModel()
            {
                Owner   = owner,
                Dogs    = dogs,
                Walkers = walkers
            };

            if (owner == null)
            {
                return(NotFound());
            }
            return(View(profileVM));
        }