I have a LINQ statement as follows:
var playedBanDataList =
from bannedPlayers in query
select new PlayerBanData
{
Admin = bannedPlayers.
You can use AsEnumerable
to make the select occur in memory instead of EF.
var playedBanDataList = query.AsEnumerable()
.Select(bannedPlayers => 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()
});