public ActionResult SearchBySubCategory(int id) { var data = new DataAccess(); var model = new IndexModel() { Lots = data.SearchLotBySubCategoryId(id) }; return View("Index", model); }
public ActionResult Index(IndexModel model = null) { var dataAccess = new DataAccess(); if (!String.IsNullOrWhiteSpace(model.SearchQuery)) return View(new IndexModel() { Lots = dataAccess.SearchLotByName(model.SearchQuery) }); if (model.Lots == null ) { return View(new IndexModel() { Lots = dataAccess.GetConvertedActualLotCollection().OrderBy(t =>t.ActualDate) }); } else { return View(model); } }
public ActionResult Index() { var model = new IndexModel(); return View(model); }