Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<Product> myMvm = db.Products.ToList();
- List<Griedview> MyViewList = myMvm.Select(x => new Griedview
- {
- ProductID = x.ProductID,
- ProductName = x.ProductName,
- UnitPrice = x.UnitPrice,
- Discontinued = x.Discontinued,
- UnitsInStock = x.UnitsInStock
- }).ToList();
- return Json(MyViewList, JsonRequestBehavior.AllowGet);
Add Comment
Please, Sign In to add comment