title: Using string_split and CROSS APPLY
body: <p>Is it possible to write this query using LINQ to Entities and not as raw SQL?</p>
  
  <pre><code>SELECT *
  FROM Articles
  CROSS APPLY string_split(Tags, ',')
  WHERE value IN ('programming', 'sql')
  </code></pre>
  
  <p>The table is something like this</p>
  
  <pre><code>CREATE TABLE Articles(Id int IDENTITY(1,1) NOT NULL PRIMARY KEY, Title nvarchar(max) NOT NULL, Tags nvarchar(max) NOT NULL);
  INSERT INTO Articles (Title, Tags) VALUES ('First', 'programming,sql');
  INSERT INTO Articles (Title, Tags) VALUES ('Second', 'programming,csharp');
  </code></pre>
  
  <p>UPDATE: It's possible with used-defined table-valued function that does <code>SELECT ... CROSS APPLY ...</code></p>
  
  <pre><code>var tags = new[] { "programming", "sql" };
  var articles = from a in db.Articles
                 join awt in db.ArticlesWithTags() on a.Id equals awt.Id
                 where tags.Contains(awt.Tag)
                 select a;
  </code></pre>
  
  <p>Is there a way to call system table-valued functions in EF?</p>