I would appreciate help in converting the following sql statement to linq:
select *
from (
select
*,
rn = row_number() over (partition by ClientId order by VisitId)
from
Visit
) activityWithRn
inner join vw_MasterView on vw_MasterView.VisitId = activityWithRn.VisitId
where activityWithRn.rn =3
When I use Linqer (a wonderful program) I get the following error:
SQL cannot be converted to LINQ: Field [rn = row_number() over (partition by ClientId order by VisitId)] not found in the current Data Context.
Thanks in advance.
I don't think there is any corresponding feature in LINQ for
row_number() over
, other than usingSkip...Take
: