하나의 데이터베이스 테이블/엔티티 객체 (NodePath)만을 다루고 있습니다. LINQ/Entity Framework에서이 T-SQL 쿼리를 어떻게 사용할 수 있습니까?
특정 노드를 감안할 때,이 쿼리에 따라 모든 NodePaths의 일부만을 얻으려면 :select
*
from
NodePath
where
NodeId = @GivenNodeId and
Id in
(
--active paths
select
a.Id
from
NodePath a join
(
select
[Path],
max(Created) as Created
from
NodePath
group by
[Path]
) b on
a.[Path] = b.[Path] and
a.Created = b.Created
)
가 어떻게 내 VB.NET 응용 프로그램에서이 작업을 수행 할 수
?Dim AllPaths = GivenNode.NodePaths.OrderByDescending(Function(p) p.Created)
Dim ActivePaths = ???
나는 더 많은 단계를이 답변을 업데이 트했습니다. 고마워, 마르셀. –