Search code examples
c#linqnhibernateactiverecordcastle-activerecord

Does Castle ActiveRecord's ActiveRecordMediator<> support LINQ?


Does Castle ActiveRecord's ActiveRecordMediator<> class support LINQ queries? I couldn't find any method that returns an IQueryable<>. My domain objects can't inherit from ActiveRecordLinqBase<> due to their design.


Solution

  • There's a separate static class for that - ActiveRecordLinq. Example:

    from w in ActiveRecordLinq.AsQueryable<MyEntity>() select w;