using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Resources.Helper; using Weee.DAL; using Weee.Models; using Weee.Areas.Admin.ViewModels; namespace Weee.Areas.Admin.Controllers { public class HomeController : AdminControllerBase { public HomeController(WeeeDataContext db) : base(db) { } public ActionResult Index() { var viewModel = new HomeViewModel(); viewModel.NormalCompanies = db.NormalCompanies.OrderBy(x => x.RegisterDate).Take(5).ToList(); viewModel.CertificationCompanies = db.CertificationCompanies.OrderBy(x => x.RegisterDate).Take(5).ToList(); viewModel.Lcas = db.LCAs.OrderBy(x => x.CreatedDate).Take(5).ToList(); return View(viewModel); } } }