public JsonResult DeleteAjax(int id)
{
Product data = (from product in _db.Product
where product.Id == id
select product).SingleOrDefault();
_db.Product.DeleteObject(data);
_db.SaveChanges();
return Json("Product deleted succsesfully");
}
VS无法识别DeleteObject()。为什么不呢?