using System.Linq; using System.Web.Mvc; using LeafWeb.Web.ViewModels.ResultStatus; namespace LeafWeb.Web.Controllers { public class ResultStatusController : ControllerBase { public ActionResult Index() { var viewModel = DataService.GetLeafInputs() .OrderByDescending(f => f.Id) .ToList() .Select(leafInput => new ResultStatusViewModel(leafInput)); return View(viewModel); } } }