How to execute a stored procedure returning a pivot table and return data as JSON in a API. I want to display its data on a web page using API. What I'm getting is just a list of objects but not the data in it. My procedure is returning 983 records of table rows in it... But column change according to passed parameters So for one kind of parameter i can have 20 column buy for the other i can have just 1 By executing procedure using
var ls = db.Database.SqlQuery<dynamic>("exec [Sp_StoreItemParty] 'Amount','01-Apr-2020', '06-Sep-2020','', '', '', ''").ToList();
return Json(ls, JsonRequestBehavior.AllowGet);
How to execute a stored procedure returning a pivot table and return it as Web API in JSON format . All i get is a list of objects but none of the objects can further be accessed or further displayed in Postman on On Firefox.