Can someone help me with this please? I would just like where to. Here is the SQL that does what I want.
select ur.RoleID from UserRoles ur where ur.RoleID in (5, 15)
And here is my attempt. The .IN () method does not exist, obviously just put my aggressive thoughts lol.
int roleid; foreach (data r in dataList) { using (DataContext communityContext = new DataContext()) { roleid = communityContext.UserRoles .Where(x => x.UserID == r.ClientId && x.RoleID.IN(5, 15)) .Select(x => x.RoleID) .First(); } }
Kukoy source share