tags:

views:

158

answers:

1

WCF Rest Starter Kit OnGetItems returns IEnumerable<KeyValuePair<string,BusinessObject>>

On serialization , It becomes

<ItemInfoList>

<ItemInfo>
<EditLink>http://localhost:1394/BService.svc/1&lt;/EditLink&gt;

<Item>
<Name>Foundations</Name>
</Item>
</ItemInfo>

<ItemInfo>
<EditLink>http://localhost:1394/Service.svc/2&lt;/EditLink&gt;

<Item>
<Name>Hitchhikers guide</Name>
</Item>
</ItemInfo>
</ItemInfoList>

I want to change the ItemInfo and ItemInfoList to something more sensible like a business entity name. How can I do that?

+1  A: 

As far as I can tell, you can't change these names because the data contracts, ItemInfosList and ItemInfo, are being provided for you by REST kit, so you're giving up some of the control by using CollectionServiceBase.

Drew Marsh