using System.Linq; using System.Web.Mvc; using LeafWeb.Web.ViewModels.LeafOutput; namespace LeafWeb.Web.Controllers { public class LeafOutputController : ControllerBase { public ActionResult Index() { var viewModel = DataService.GetLeafInputFiles() .OrderByDescending(f => f.Id) .ToList() .Select(f => new LeafOutputViewModel(f)); return View(viewModel); } } }