public IActionResult Index() { //util.getCities(); var data = iModelRepositery.GetDetails().GroupBy(x => x.CompanyName) .Select(x => new GroupBYCompany() { CompanyName = x.Key, Models = x }); return(View(data)); }
public ActionResult Index() { var data = iModelRepositery.GetDetails().OrderBy(x => x.LaunchDate).GroupBy(x => x.CompanyName) .Select(x => new GroupBYCompany() { CompanyName = x.Key, Models = x }); return(View(data)); }