Starting with Ayende's article at
http://ayende.com/Blog/archive/2009/05/ ... mples.aspxand using the example Criteria Query:
Code:
var blogs = s.CreateCriteria<Blog>()
.Add(Subqueries.PropertyIn("id",
DetachedCriteria.For<Post>()
.SetProjection(Projections.Property("Blog.id"))
.CreateCriteria("User")
.Add(Restrictions.Eq("Username","Ayende"))
))
.List<Blog>();
I have this working OK. Now I'd like to extend it to perform a DISTINCT query on some columns in the result set and I haven't been able to figure it out. Can anyone help?
Thanks
Steve