I think right now you can do that this way:
// the identity is of an student
if (identity.Students.Count >0)
{
StudentEntity theStudent = identity.Students[0];
}
// the identity is of an teacher
if (identity.Teachers.Count >0)
{
TeacherEntity theTeacher = identity.Teacher[0];
}
This assumes you have no uniqueConstraint in the Student or Teacher tables for the identityId, otherwise, you can fetch single records:
// the identity is of an student
if (identity.Student != null)
{
StudentEntity theStudent = identity.Student;
}
// the identity is of an teacher
if (identity.Teacher != null)
{
TeacherEntity theTeacher = identity.Teacher;
}
Is this what are you looking for? Do you want to use inheritance (having an StudentIdentityEntity or a TeacherIdentityEntity)?
What LLBLGen version are you using?