I'm completely new to LINQ, i want to rewrite some of mine SQL querys into LINQ (just to learn) and i'v already stuck at the beginning.
Here is SQL query :
declare @typMon varchar(200)
set @typMon = 'moneta'
select *
from [db1].[dbo].[Picking]
where number = 1000
and Group IN (Select grupa
from [db2].[dbo].[groups]
where typ = @typMon)
Subquery returns 3 output rows : https://i.stack.imgur.com/CDOwr.png
And here is what i'v write in LINQ
This part works ok :
var query = from x in db.grupyTowarowes
where x.typ == typMoneta
select new
{
x.grupa
};
Problem is here:
var test = from z in dbContext.PICKINGs
where z.Number == 1000
&& z.group IN output from 1st query
select new
{
z.id
};