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

namespace API.Controllers
{
	public partial class GridController : Controller
    {
		public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
		{
			var result = Enumerable.Range(0, 50).Select(i => new GridModel
			{
				Id = i,
				field = "field" + i,
				Value = i * 10
            });

			return Json(result.ToDataSourceResult(request));
		}
	}
}
