Пример #1
0
        public ActionResult Index()
        {
            int ownerId = GetCurrentUserId();

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

            return(View(dogs));
        }
Пример #2
0
        // GET: OwnerController/Details/5
        public ActionResult Details(int id)
        {
            Owner owner = _ownerRepo.GetOwnerById(id);

            ProfileViewModel vm = new ProfileViewModel()
            {
                Owner   = _ownerRepo.GetOwnerById(id),
                Dogs    = _dogRepo.GetAllDogsWithOwner(owner.Id),
                Walkers = _walkerRepo.GetWalkersInNeighborhood(owner.NeighborhoodId)
            };

            return(View(vm));
        }