internal static bool IsSpatialType(this TypeUsage type, out PrimitiveTypeKind spatialType) { if (type.IsSpatialType()) { spatialType = ((PrimitiveType)type.EdmType).PrimitiveTypeKind; return(true); } spatialType = PrimitiveTypeKind.Binary; return(false); }