title: JsonResult return Json in ASP.NET CORE 2.1
body: <p>Controller that worked in ASP.NET Core 2.0:</p>
  
  <pre><code>[Produces("application/json")]
  [Route("api/[controller]")]
  [ApiController]
  public class GraficResourcesApiController : ControllerBase
  {    
      private readonly ApplicationDbContext _context;
  
      public GraficResourcesApiController(ApplicationDbContext context)
      {
          _context = context;
      }
  
      [HttpGet]
      public JsonResult GetGrafic(int ResourceId)
      {
          var sheduling = new List&lt;Sheduling&gt;();
  
  
          var events = from e in _context.Grafic.Where(c=&gt;c.ResourceId == ResourceId)
                       select new
                       {
                           id = e.Id,
                           title = e.Personals.Name,
                           start = e.DateStart,
                           end = e.DateStop,
                           color = e.Personals.Color,
                           personalId = e.PersonalId,
                           description = e.ClientName
                       };
          var rows = events.ToArray();
  
          return Json(rows);
      }
  }
  </code></pre>
  
  <p>in ASP.NET Core 2.1</p>
  
  <pre><code>return Json (rows);
  </code></pre>
  
  <p>writes that Json does not exist in the current context. If we remove Json leaving simply</p>
  
  <pre><code>return rows;
  </code></pre>
  
  <p>then writes that it was not possible to explicitly convert the type List () to JsonResult</p>
  
  <p>How to convert to Json now?</p>