Say i have a object like this
public class Student{
public IList<Coursework> Courseworks{get;set;}
public string Name{get;set;}
public int Age{get;set;}
public bool HasCompletedCoursework(int courseyear, string moduleName)
{
return Courseworks.Any(x => x.Courseyear == courseyear && x.ModuleName == moduleName && IsComplete);
}
}
public class Coursework{
public int Courseyear{get;set;}
public string ModuleName{get;set;}
public bool IsComplete {get; set;}
}
is it possible to call the HasCompletedCoursework method on the Student class when you use ICriteria to query the database.
Cheers Colin G