Ejemplo n.º 1
0
        private static string GetUriRepresentationForKeyValue(PropertyInfo key, object entityInstance)
        {
            Contract.Assert(key != null);
            Contract.Assert(entityInstance != null);

            return(ODataUriBuilder.GetUriRepresentation(key.GetValue(entityInstance, null)));
        }
Ejemplo n.º 2
0
        // gets the primitive odata uri representation.
        public static string GetUriRepresentationForValue(object value)
        {
            Contract.Assert(value != null);
            Contract.Assert(EdmLibHelpers.GetEdmPrimitiveTypeOrNull(value.GetType()) != null);

            value = ODataPrimitiveSerializer.ConvertUnsupportedPrimitives(value);
            return(ODataUriBuilder.GetUriRepresentation(value));
        }