title: ASP.NET MVC ActionResult How to return data in response to GET request
body: <p>I'm having trouble creating a method in response to AJAX GET request from the Javacript. I have debugged it and it goes into the GET response method in the back-end and retrieves the proper data, but I am not sure how to return the data to the front.</p>
  
  <p>Here is my code :
  Backend:</p>
  
  <pre><code>    [HttpGet]
      public ActionResult GetOldEntries()
      {
          var data = db.Entries.Where(e =&gt; e.Date.Month != DateTime.Now.Month);
          return data; // How do I properly return data?
      }
  </code></pre>
  
  <p>Front End:</p>
  
  <pre><code>$.get('/Home/GetOldEntries', function (data) {
      console.log(data);
  });
  </code></pre>