Castle ActiveRecord 使用 linq

 

using Castle.ActiveRecord.Linq;

1.Make your entities inherit from ActiveRecordLinqBase<T>, then to query:

var blogs = (from b in Blog.Queryable select b).ToList();


2.Use ActiveRecordLinq.AsQueryable
<T>, e.g.: var blogs = (from b in ActiveRecordLinq.AsQueryable<Blog>() select b).ToList();

posted on 2012-12-03 15:38  一个石头  阅读(237)  评论(0)    收藏  举报