Last post Feb 11, 2014 01:54 PM by BotHead
Feb 11, 2014 11:41 AM|BotHead|LINK
I am trying to create a custom ID/Edit link and add a segment (KeyValuePathSegment) in the link factory. The value I want to add as the segment is a GUID, which for example should be formatted as guid'70CD9952-8CEE-4F26-8519-8D1CC03B2981' in the segment.
I'd like to do this generically via some helper/formatter class in the Web API stack, such that I can hand it a guid and it will give me back this segment path correctly formatted, which I can then add as a new segment.
Is there a public helper/formatter class that will help me do something like this?
Feb 11, 2014 01:54 PM|BotHead|LINK
Figured this one out.
var guid = Guid.NewGuid();
var guidTest = ODataUriUtils.ConvertToUriLiteral(guid, ODataVersion.V3);