I'm not sure how to add paging to this:
Session.Linq<Article>()
.Where(art => art.Tags.Any(t => t.Name == tag)).ToList().
So i decided to use Criteria API.
var rowCount = Session.CreateCriteria(typeof(Article))
.SetProjection(Projections.RowCount()).FutureValue<Int32>();
var res = Session.CreateCriteria(typeof(Article))
.Add(/* any help with this? :) */)
.SetFirstResult(page * pageSize)
.SetMaxResults(pageSize)
.AddOrder(new Order("DatePublish", true))
.Future<Article>();
totalCount = rowCount.Value;
Any help appreciated.