using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Kendo.Mvc.UI;
using Kendo.Mvc.Extensions;
using KendoDetailsExample.Models;

namespace KendoDetailsExample.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {            
            return View();
           
        }

        public ActionResult Read([DataSourceRequest] DataSourceRequest request)
        {
            return Json(Enumerable.Range(0, 2)
                .Select(i => new MyModel { ID = i, Text = "Text " + i })
                .ToDataSourceResult(request));
        }
    }
}
