Linq

ActiveRecord & NHibernate.Linq

I've been doing a lot of work with Castle's ActiveRecord. In order to get my data back from the database I have been doing queries like: var activities = Repository.FindAll<Activity>(Expression.Eq("Status", StatusEnum.Published) This works great, except for having to use a string for the property I want to set my expression for. How about this: var mostPopularActivities = Repository.SlicedFindAll<Activity>(new[] { "Categories" }, 0, 5, new[] { new Order("ViewCount", false) }, Expression.Eq("Categories.Id", category.Id), Expression.Eq("Status", StatusEnum.Published)); Anybody understand this? Now it's getting really complex. What we are saying is "Get me all the activities and join categories, and get me rows 0 - 5 (top 5), and...

WP Theme &Icons by N.Design Studio adapted by timheuer and ruined by rodj!