ho le seguenti tabelle:Come si scrive questa domanda incrociata in LINQ-to-SQL?
create table TableA (
Id int primary key identity,
Key int not null
)
create table TableB (
Id int primary key identity,
TableA_Id int not null foreign key references TableA(Id),
Value varchar(80) not null
)
vorrei scrivere la seguente query in LINQ to SQL utilizzando la notazione lambda:
select TableA.Key, b.Value
from TableA
cross apply (
select top 10 TableB.Value
from TableB
where TableA.Id = TableB.TableA_Id
order by TableB.Value
) b
where TableA.Key between 0 and 999
Come faccio a fare questo?