This is a complex query using a lot of server-side functions and querying from two tables without a join specified and then joining with a third table. It should be generally possible to reproduce the desired result with a LINQ query, but I would prefer another approach which I find more straight-forward and easier to implement. This query, looks like the perfect candidate for a database View, which you can create on your server. OpenAccess is able to map views to entities so you would get an object with the name of the view and there will be an IQueryable end-point on the context. So imagine your view is called "CustomView":
EntitiesModel context =
IList<CustomView> result = context.CustomViews.ToList();
The code above will execute the exact same query you have in the database and materialize it to an appropriate object.
the Telerik team
Follow @OpenAccessORM Twitter channel to be the first one to get the latest updates on new releases, tips and tricks and sneak peeks at our product labs!