Hi All,
I have the following which works ok:
Public Shared Function GroupStudentCountByGroupIdent(ByVal groupIdent As Integer) As Integer
Dim i As Integer
Dim Filter As IPredicate = PredicateFactory.CompareValue(MedfordSchoolDistrict.Elementary.GradeBook.LLBL.GroupStudentFieldIndex.GroupIdent, ComparisonOperator.Equal, groupIdent)
i = CType(_Adapter.GetScalar( _
EntityFieldFactory.Create(Elementary.GradeBook.LLBL.GroupStudentFieldIndex.GroupIdent), Nothing, _
AggregateFunction.CountRow, Filter, Nothing), Integer)
Return i
End Function
The GroupIdent is a FK into GroupStudent. Am I creating the Filter correctly or is there a better way using a relationship predicate.
Thanks,
Fishy