Guest User

Untitled

a guest
Jun 13th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. List<Product> myMvm = db.Products.ToList();
  2. List<Griedview> MyViewList = myMvm.Select(x => new Griedview
  3. {
  4. ProductID = x.ProductID,
  5. ProductName = x.ProductName,
  6. UnitPrice = x.UnitPrice,
  7. Discontinued = x.Discontinued,
  8. UnitsInStock = x.UnitsInStock
  9. }).ToList();
  10.  
  11.  
  12. return Json(MyViewList, JsonRequestBehavior.AllowGet);
Add Comment
Please, Sign In to add comment