using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcScaffolding.Models;

namespace MvcScaffolding.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            
                
            ViewBag.Message = "Modify this template to kick-start your ASP.NET MVC application.";

            return View();
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your app description page.";

            return View();
        }



        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";


            

            return View();
        }

        [HttpPost]
        public ActionResult Hotel(Hotel h)
        {
            return View(h);
        }

        public ActionResult Hotel()
        {
            var r = new Region();
            r.Id = 1;
            r.Bezeichnung = "Gleisdorf";

            var h = new Hotel();
            h.Region = r;
            h.Id = 100;
            h.Name = "Hotel Mama";
            h.Sterne = 5;

            return View(h);
        }

    }
}
