title: Sql query with multiple ids in .NET
body: <p>I have following method</p>
  
  <pre><code>public SomeObj LoadSomeData(int id)
  {
      using (var context = new DataContext())
      {
          var result = 
              context.Database.SqlQuery&lt;SomeObj&gt;
              ($"SELECT * FROM SOMEOBJECT WHERE id = {id}")
          return result;
      }
  }
  </code></pre>
  
  <p>This works fine, now the specification has changed, and I need to lookup multiple <code>ids</code>. I get ids as list of int and return a list. I read a bit about Sql Query and I can use <code>IN</code> and pass multiple values. So this is my changes:</p>
  
  <pre><code>public List&lt;SomeObj&gt; LoadSomeData(List&lt;int&gt; listOfIds)
  {
      using (var context = new DataContext())
      {
          var result = 
              context.Database.SqlQuery&lt;SomeObj&gt;
              ($"SELECT * FROM SOMEOBJECT WHERE id IN ({id})") &lt;-- I am not sure how to pass list in 
          return result;
      }
  }
  </code></pre>
  
  <p>The second method works when I pass values manually to the query like 1,2,3 etc. but how can I pass list of to query?</p>