示例#1
0
        // GET: WalkersController/Details/5
        public ActionResult Details(int id)
        {
            Walker       walker       = _walkerRepo.GetWalkerById(id);
            Neighborhood neighborhood = _neighborhoodRepo.GetNeighborhoodById(walker.NeighborhoodId);

            walker.Neighborhood = neighborhood;
            List <Walk> walks = _walkRepo.GetWalkerViewWalks(id);

            if (walker == null)
            {
                return(NotFound());
            }
            ProfileViewModel vm = new ProfileViewModel()
            {
                Walker = walker,
                Walks  = walks
            };

            return(View(vm));
        }