private static string GetUriRepresentationForKeyValue(PropertyInfo key, object entityInstance) { Contract.Assert(key != null); Contract.Assert(entityInstance != null); return(ODataUriBuilder.GetUriRepresentation(key.GetValue(entityInstance, null))); }
// 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)); }