Hello Team,
Please the value of my OrderId keep showing zero on the console panel when I click on update query, kindly assist.thank you
public ActionResult getNewOrder() { using (db = new ASPNETMASTERPOSTEntities()) { var dataList = db.tblCustomers.Include("tblOrders"); var modifiedData = dataList.AsEnumerable().SelectMany(x => x.tblOrders.Select(d => new OrderViewModel { CustomerId = x.CustomerId, CustomerName = d.tblCustomer.CustomerName, PhoneNo = d.tblCustomer.PhoneNo, OrderDate = d.tblCustomer.OrderDate, CategoryName = d.CategoryName, ProductName = d.ProductName, Quantity = d.Quantity, UnitPrice = d.UnitPrice, TotalAmount = d.TotalAmount, OrderId = d.OrderId })).ToList(); return Json(modifiedData, JsonRequestBehavior.AllowGet); } }