I know that there are a lot similar questions here, but I did not find anyone which is asking exactly the same thing.
I am developing a project using ASP.NET and MVC4. I am using aspx as a view engine. I have a javascript code at my views, which gets as input a table of values, and creates a graph based on them.
I get those values from my database using the query below
var query = from b in db.SchoolTestsPerModulePerStudent
where b.StudentID.Equals(2)
select b;
Now, my question is if I have these results in arrays (I did not figured out yet, how given b, to split its results in two arrays, one containing the id of test and the other containing the grade of the student yet, but I hope I will soon), what is the best(easy and clear) way to return these arrays from C# to javascript?