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

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

            var model = GetCategories();

            return View(model);
        }

        private IEnumerable<Category> GetCategories() {

            var categories = Enumerable.Range(0, 50).Select(i => new Category
            {
                CategoryID = i,
                CategoryName = "Category" + i,
                CategoryDescription = "Description" + i
            });

            return categories;
        }
    }
}
