How can I add a projection to this code? I am trying to sort my results according to date created or last updated.
var c = new Conjunction();
c.Add(Restrictions.Where<InstructionTask>(x => x.IsOpen == _setDefaultStatusIfNotFound(status)));
//error adding this projection:
if (string.IsNullOrEmpty(sort) || sort.Equals("created", StringComparison.OrdinalIgnoreCase))
c.Add(Projections.Property<InstructionTask>(x => x.DateCreated));
I am passing in my Conjuction
to another method that will handle the retrieving of tasks i.e. var tasks = GetCollaboratedTasks(c);