2009-10-22 74 views
0

WCF休息初學者工具包OnGetItems返回IEnumerable<KeyValuePair<string,BusinessObject>>WCF休息入門套件OnGetItems:格式化的IEnumerable <KeyValuePair .. XML

在系列化,它成爲

<ItemInfoList> 

<ItemInfo> 
<EditLink>http://localhost:1394/BService.svc/1</EditLink> 

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

<ItemInfo> 
<EditLink>http://localhost:1394/Service.svc/2</EditLink> 

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

我想將ItemInfo和ItemInfoList更改爲更具像商業實體名稱一樣明智。我怎樣才能做到這一點?

回答

1

據我所知,您不能更改這些名稱,因爲數據協定ItemInfosList和ItemInfo是由REST套件爲您提供的,因此您使用CollectionServiceBase放棄了一些控制。

相關問題