using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MVC3TestsApp.Models;
using Telerik.Web.Mvc;

namespace MVC3TestsApp.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewModel.Message = "Welcome to ASP.NET MVC!";

            NorthwindDataContext nw = new NorthwindDataContext();

            return View(nw.Employees.ToList());
        }

        [GridAction]
        public ActionResult _Index()
        {
            NorthwindDataContext nw = new NorthwindDataContext();

            return View(new GridModel(nw.Employees.ToList()));
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
