public ActionResult SearchProduct(string name) { MongodbFunctions mongo = new MongodbFunctions(); if (name.Equals("")) { return(RedirectToAction("Home", "Index")); } return(View(mongo.SearchForProductsByName(name))); }
public ActionResult SearchProduct(string name) { MongodbFunctions mongo = new MongodbFunctions(); if (name.Equals("")) { return(RedirectToAction("Home", "Index")); } List <Databases.DomainModel.Product> products = mongo.SearchForProductsByName(name); return(View(products)); }