public ActionResult Index() { CategoryCatalogModel model = new CategoryCatalogModel(); model.Categories = categories.SelectAllCategoriesForHomePage(); return(View(model)); }
public ActionResult MyPostings() { CategoryCatalogModel model = new CategoryCatalogModel(); model.Categories = categoryManager.SelectAllCategoriesForHomePage(); model.Postings = postingsManager.SelectAllPostingsByUserId(Session.GetUser().Id); return(View(model)); }
// GET: Postings public ActionResult Index(int Id) { CategoryCatalogModel model = new CategoryCatalogModel(); model.Categories = categoryManager.SelectAllCategoriesForHomePage(); model.ActivePosting = postingsManager.SelectPostingById(Id); model.ActiveCategory = categoryManager.SelectCategoryById(model.ActivePosting.CategoryId); return(View(model)); }
// GET: Category public ActionResult Index(int Id) { CategoryCatalogModel model = new CategoryCatalogModel(); model.Categories = categoryManager.SelectAllCategoriesForHomePage(); model.Postings = postingsManager.SelectAllPostingsByCategory(Id); model.ActiveCategory = model.Categories.Find(c => c.Id == Id); return(View(model)); }