I have created a dynamic stored procedure (using Pivot). I have no idea about the columns returned by the stored procedure. So I am not able to create a viewmodel class.
I searched and found this method to execute stored procedure:
public List<dynamic> GetData(int CurriculumID)
{
var data = context.Database.SqlQuery<dynamic>("MyProcedureName @CurriculumId", new SqlParameter("CurriculumId", CurriculumID)).ToList();
return data;
}
Now I am not sure how to send this data to razor view and create dynamic table based on the data. Any guidance?
I am also not able to view data here is how I am getting it: