title: How to return a list of int in Entity Framework Core using FromSqlRaw?
body: <p>I have this sql query which uses raw sql in Entity Framework 6 and return a list of integer.</p>
  <pre><code>var sqlString = &quot;SELECT DISTINCT A.ListId FROM ABC A INNER JOIN ABCLists B ON B.Id = A.ListId&quot;
  
  var recordIds = context.Database.SqlQuery&lt;int&gt;(sqlString).ToList();
  </code></pre>
  <p>How to convert this above into Entity Framework Core 3?</p>
  <p>I tried with EF Core, but not sure where to define it to return as list int type. Below is what I have.</p>
  <pre><code>var recordIds = _djContext.ABC.FromSqlRaw(sqlString).ToList();
  </code></pre>
  <p>Notes: I don't need LINQ version but only raw SQL. Thanks.</p>