public bool IsSubtypeOf(EdmType firstType, EdmType secondType) { if (secondType == null) { return false; } // walk up firstType hierarchy list for (EdmType t = firstType.BaseType; t != null; t = t.BaseType) { if (t == secondType) return true; } return false; }