Is there a way to add criteria to a mapping for NHibernate?
public class Course {
public IList<Participant> Participants { get; set; }
public IList<Participant> ActiveParticipants { get; set; }
}
The second property, ActiveParticipants should be a list of participants where their "Status" is set to "Active". Otherwise, is there a way to post process the class, but still maintaining Lazy Loading, as sometimes the "ActiveParticipants" property will not be used.
The reason it needs to be like this instead of using LINQ, is the class is injected into a dynamic "Mustache" template, which only works with standard properties. There are also several similar properties like this.