How can I pass the results returned by a method from controller to the view <p>I want to use the results returned by a method (cursor in my case) from the controller in my view, in order to draw a graph from the data returned. I wrote a piece of code but I have not found how to pass data to the view. </p> <pre><code> //controller [HttpPost] public async System.Threading.Tasks.Task&lt;ActionResult&gt; drawgraph(Inputmodel m) { List&lt;Client&gt; client = new List&lt;Client&gt;(); var collection = db.GetCollection&lt;Client&gt;("Client"); var builder = Builders&lt;Client&gt;.Filter; var beginDate = Convert.ToDateTime(m.date_begin).Date; var endDate = Convert.ToDateTime(m.date_end).Date; var filter = builder.Gte("date", beginDate) &amp; builder.Lt("date", endDate.AddDays(1)) &amp; builder.Eq("field2", m.taux); var cursor = await collection.DistinctAsync&lt;double&gt;("field2",filter); return View(cursor); } </code></pre> <hr> <pre><code>//view @{ var myChart = new Chart(width:600,height: 400) .AddTitle("graphique") .AddSeries(chartType: "Line") .DataBindTable(dataSource: cursor, xField: "date", yField:"field2") //here I want to use the returnet result by drawgraph in the controller .Write(); } </code></pre>