private static bool ValidateScalarTypesAreCompatible(TypeUsage cspaceType, TypeUsage storeType) { if (Helper.IsEnumType(cspaceType.EdmType)) { return(TypeSemantics.IsSubTypeOf(TypeUsage.Create((EdmType)Helper.GetUnderlyingEdmTypeForEnumType(cspaceType.EdmType)), storeType)); } return(TypeSemantics.IsSubTypeOf(cspaceType, storeType)); }
internal static PrimitiveType AsPrimitive(EdmType type) { if (!Helper.IsEnumType(type)) { return((PrimitiveType)type); } return(Helper.GetUnderlyingEdmTypeForEnumType(type)); }