SELECT ROW_NUMBER() OVER(PARTITION BY RoleID ORDER BY Time ) As RANK,ID FROM TRecharge
这样 如何转换成linq 的写法
linq还要序号干嘛
SELECT dbo.TRecharge.RoleID , dbo.TRole.RoldName , OrderID , RMB , RANK --获得这个用户是第几次充值 FROM dbo.TRecharge --订单表 LEFT JOIN dbo.TRole ON trecharge.RoleID = dbo.TRole.ID --角色表 LEFT JOIN ( SELECT ROW_NUMBER() OVER ( PARTITION BY RoleID ORDER BY Time ) AS RANK , ID FROM TRecharge ) t ON dbo.TRecharge.ID = t.ID ---获得这个用户是第几次充值
要把这段转换成Linq 能帮我看下嘛