Esempio n. 1
0
        public JsonResult GetOrders()
        {
            var dbResult = db.SF_GetOrdersDetails();
            var orders   = (from row in dbResult
                            select new
            {
                row.CategoryID,
                row.CategoryName,
                row.Discount,
                row.Employee,
                row.OrderDate,
                row.OrderID,
                row.ProductID,
                row.ProductName,
                row.Quantity,
                row.ShipCity,
                row.ShipCountry,
                row.ShippedDate,
                row.ShipPostalCode,
                row.Total,
                row.UnitPrice
            });

            return(Json(orders, JsonRequestBehavior.AllowGet));
        }