I’m new to MVC. Trying out some sample code to list items from db.
public ActionResult Index()
{
var vendors = eproc_db.Vendors.ToList();
return View(vendors);
}
the above function returns all the records in the table. How do i make it return only those with status=’A’
Similarly when I do edit, instead of “delete from”, is it possible to do “update set status=’D’…”
Not sure what your sample code has to do with stored procedures or ASP.NET MVC 3 (it is related to Entity Framework, or whatever this
eproc_db.Vendorsis), but how about: