public bool IsKey(EdmProperty property) { if (property != null && property.DeclaringType.BuiltInTypeKind == BuiltInTypeKind.EntityType) { return ((EntityType)property.DeclaringType).KeyMembers.Contains(property); } return false; }