title: LINQ to Entities split string on result
body: <p>I have a LINQ statement as follows:</p>
  
  <pre><code>var playedBanDataList =
      from bannedPlayers in query
      select new PlayerBanData
      {
          Admin = bannedPlayers.Admin,
          BannedUntil = bannedPlayers.BannedUntil,
          IsPermanentBan = bannedPlayers.IsPermanentBan,
          PlayerName = bannedPlayers.PlayerName,
          Reason = bannedPlayers.Reason,
          IpAddresses = bannedPlayers.IpAddresses.Split(new [] {","}, StringSplitOptions.RemoveEmptyEntries).ToList()
      };
  
      return playedBanDataList.ToList();
  </code></pre>
  
  <p>This fails because split function fails on <code>IpAddresses</code> as LINQ to Entities cannot translate this query to SQL. </p>
  
  <p>This makes sense, but then what's an equivalent way of accomplishing this elegantly? The only way I've thought of is to manually run a loop on the retrieved string then splitting it, but I'd like to get it in one go.</p>