public ActionResult FilterRecordsFromCategory(int id) { ViewData["Title"] = "MyTitle"; ViewData["list"] = _datamanager.Record.GetRecordsFromCategory(id); ViewData["Action"] = "FilterRecordsFromCategory"; RecordIdForComment r = new RecordIdForComment(); ViewData["commentCount"] = r.recordforcomment((IEnumerable <Record>)ViewData["list"]); ViewData["CategoryTitle"] = _datamanager.Category.GetCategory(id).NameCategory; return(View()); }
////////////////////////////////////////////////// public ActionResult Index() { ViewData["Title"] = "MyTitle"; ViewData["list"] = _datamanager.Record.GetAllRecords(); RecordIdForComment r = new RecordIdForComment(); ViewData["commentCount"] = r.recordforcomment((IEnumerable <Record>)ViewData["list"]); IEnumerable <Record> query = _datamanager.Record.GetAllRecords().OrderByDescending(record => record.Id_Record); ViewData["SHIT"] = query; return(View()); }