public static string GetTypeCast(this ODataObject oDataObject)
        {
            string typeCast;

            if (oDataObject.TryGetProperty("TypeCast", out typeCast))
            {
                return(typeCast);
            }
            return(null);
        }
        public static Uri GetMetadataBaseUri(this ODataObject oDataObject)
        {
            string metadata;

            if (oDataObject.TryGetProperty("MetadataBaseUri", out metadata))
            {
                return(new Uri(metadata, UriKind.RelativeOrAbsolute));
            }
            return(null);
        }
        public static string GetEntitySet(this ODataObject oDataObject)
        {
            string entitySet;

            if (oDataObject.TryGetProperty("EntitySet", out entitySet))
            {
                return(entitySet);
            }
            return(null);
        }
        public static ODataObjectType GetODataObjectType(this ODataObject oDataObject)
        {
            string type;

            if (oDataObject.TryGetProperty("TypeCast", out type))
            {
                ODataObjectType @enum;
                if (Enum.TryParse(type, out @enum))
                {
                    return(@enum);
                }
            }
            return(ODataObjectType.Entity);
        }