예제 #1
0
        //  ------------     Actions    -------------    //

        #region public Actions

        // GET: Owner (all appointments by owner)
        public ActionResult Index()
        {
            Guid               ownerID        = GetIDByUserId();
            List <Guid>        myPets         = petRepository.GetByOwner(ownerID).Select(x => x.PetID).ToList();
            List <Appointment> myAppointments = appointmentRepository.GetAppointmentsByPetList(myPets);

            return(View("Appointments", myAppointments));
        }
예제 #2
0
        public ActionResult Index()
        {
            string userId = User.Identity.GetUserId();

            ownerID = ownerRepository.GetIdByUserId(userId);
            var pets = repository.GetByOwner(ownerID);

            return(View("Index", pets));
        }