Using.NET Core and EF, I'm trying to implement a complex query statement that uses the WHERE IN statement for many statuses, such as:
select * from Requests where RequestStatusId in (1, 2, 3)
I tried the following code because I needed to convert this query to Linq.Contains
var Items = await _context.Requests.Where(r => r.RequestStatusId.Contains(new[] { 1,2,3}));
But it dosen't works i get error the below error:
- Argument 1: cannot convert from 'int[]' to 'char'
How do I use WHERE IN statement in Linq C#?