Please in my controller I have this code to fetch data from two tables in the database, it fetches the data alright but Quantity and TotalAmount amount is not coming. thank you.
public ActionResult getNewOrder()
{
ASPNETMASTERPOSTEntities db = new ASPNETMASTERPOSTEntities();
var dataList = db.tblSales.Include("tblSalesDetails").ToList();
var modifiedData = dataList.Select(x => new
{
SalesDetailId = x.SalesDetailId,
Quantity = x.Quantity,
ProductId = x.ProductId,
ProductName = x.tblProduct.ProductName,
SalesId = x.SalesId,
OrderDate = x.OrderDate,
SubTotal = x.SubTotal,
DiscountPercent = x.DiscountPercent,
VatPercent = x.VatPercent,
TotalAmount = x.TotalAmount
}).ToList();
return Json(modifiedData, JsonRequestBehavior.AllowGet);
}