used mvc3 for CRUD...but how to do a search feature?

Oct 21, 2012 at 11:14 PM
Hi...

Ive used http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/crud-operation-in-Asp-Net-mvc-framework/ to create a database driven website for a rental company using the CRUD outlook...but now im looking to add a search feature and cant find any online....any help guys?

iv tried something like

 
public ActionResult Search(int id)
       
{
           
return View();
       
}

       
[HttpPost]
       
public ActionResult Search(Rental rentals)
       
{
           
try
           
{
               
                _entities
.//find record(rentals);
                _entities
.SaveChanges();

               
return RedirectToAction("Index");
           
}
           
catch
           
{
               
return View();
           
}
       
}
Thanks