Ejemplo n.º 1
0
        public IActionResult Index()
        {
            var model = new HomeIndexViewModel();

            model.Resturants     = _resturantData.GetAll();
            model.CurrentMassage = _greeter.GetMessageOfTheDay();

            return(View(model));// ObjectResult(model);
        }
Ejemplo n.º 2
0
        public IActionResult index()
        {
            var model = new HomePageViewModel();

            model.Resturants     = _resturandData.GetAll();
            model.CurrentMessage = _greeter.GetGreeting();

            return(View(model));
        }
Ejemplo n.º 3
0
        public IActionResult Index()
        {
            var model = new HomeViewModel
            {
                Resturants = _resturantData.GetAll()
            };

            return(View(model));
        }
Ejemplo n.º 4
0
        public IActionResult Index()
        {
            var model = new HomeIndexViewModel
            {
                Resturants     = _resturnatData.GetAll(),
                CurrentMessage = ""
            };

            return(View(model));
        }
        // on get process the get request
        public void OnGet()
        {
            // any data this method exposes the razor page
            // has this access to this value
            //Message = "hello World";
            // this is how you can access settings
            Message = Config["Messages"];


            // now after this we can add
            // this to our ListModel


            // now fill the Resturants property with data
            ResturantsField = resturantData.GetAll();

            // ok now go to razor pages
        }
Ejemplo n.º 6
0
        public IViewComponentResult Invoke()
        {
            var model = _greeter.GetAll();

            return(View("Default", model));
        }
Ejemplo n.º 7
0
 public void OnGet()
 {
     Resturants = resturantData.GetAll();
     Message    = config["Message"];
 }
Ejemplo n.º 8
0
        public IEnumerable <Resturant> Get()
        {
            var model = resturantData.GetAll();

            return(model);
        }
        public IEnumerable <Restaurant> Get()
        {
            var model = db.GetAll();

            return(model);
        }