public ActionResult VideoCategory(int categoryId) { var user = AuthService.CurrentUser; /*if (user == null) * return RedirectToAction<SimpleRegController>(c => c.Registration(Request.Url.AbsolutePath, "ВИДЕОСАЙТ"));*/ if (categoryId == 0) { return(null); } var category = VideoCategoryService.GetByPK(categoryId); if (category == null) { return(null); } var videos = VideoService.GetAll(x => x.CategoryId == categoryId && x.IsActive).OrderByDescending(x => x.VideoID).ToList(); var model = new VideoCategoryVM { Category = category, Videos = videos }; return(BaseViewWithModel(new VideoCategoryView(), model)); }
public List <string> GetBreadCrumbs(VideoCategoryVM model) { var breadcrumb = new List <string>(); breadcrumb.Add(_helper.Url().Videos().ToString()); return(breadcrumb); }