I got error boolean Contains does not support conversion to SQL
I have array of the rooms id which should be removed
I want to remove with this query but I can’t succeed. How may I do this?
var rooms = from rooms in entity.Rooms
where myArray.contains(rooms.RoomID) select rooms;
You are trying to mix the call. Array.Contains happens on client, but you are putting it into the middle of the expression that is sent to the sql server.
You need to either send the whole lot to sql for the comparison, or return the rows from sql and compare them locally.
or using lambda syntax: