Beispiel #1
0
        public ActionResult Index()
        {
            int ownerId = GetCurrentUserId();

            List <Dog> dogs = _dogRepo.GetAllDogsByOwner(ownerId);

            return(View(dogs));
        }
Beispiel #2
0
        // GET: Owners/Details/5
        public ActionResult Details(int id)
        {
            ProfileViewModel vm = new ProfileViewModel();

            vm.Owner = _ownerRepo.GetOwnerById(id);

            if (vm.Owner == null)
            {
                return(NotFound());
            }

            vm.Dogs = _dogRepo.GetAllDogsByOwner(id);

            vm.Walkers = _walkerRepo.GetWalkersInNeighborhood(vm.Owner.NeighborhoodId);

            return(View(vm));
        }