Example #1
0
        // GET: Reservations
        public ActionResult Index()
        {
            ReservationsRepository    repository = new ReservationsRepository();
            ReservationsListViewModel model      = new ReservationsListViewModel();

            RestaurantsRepository rep  = new RestaurantsRepository();
            UsersRepository       repo = new UsersRepository();

            List <Reservation> reservations = repository.GetActive();
            List <Restaurant>  restaurants  = rep.GetAll();
            List <User>        users        = repo.GetAll();

            model.Reservation = reservations;
            model.Restaurants = restaurants;
            model.Users       = users;
            return(View(model));
        }