当前位置: 动力学知识库 > 问答 > 编程问答 >

wcf - ASP.NET Web API and untyped data-collections

问题描述:

We want to expose (through an API) big data collections that are a combination of flat file/binary files and xml files. Currently we do this with WCF Data Services (OData), and tranfer this data using a custom Untyped Data Provider as described in this tutorial (past 4): http://msdn.microsoft.com/en-us/data/gg191846

Performance is bad though and customization is hard, so we are thinking of 'upgrading' to ASP.NET Web API (2). Daniel Roth from the Web API team has given an interesting talk at TechEd2013 on the differences between WCF Data Services and Web API (see it here: http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/DEV-B209) and at 1h06m he mentions briefly that 'Web API doesnt support untyped data yet, but it's coming'. I'm a little confused as to what this means for us. Does this mean that ASP.NET Web API is a no-go for us no matter what, or that we can move to Web API, but will (probably) still need a custom data provider? Any insight would be appreciated!

网友答案:

Looks like this update came at the right time: http://www.asp.net/visual-studio/overview/2013/release-notes

Type-less support

You can now build OData services without needing to define CLR types for your entity types. Instead, your OData controllers can take or return instances of IEdmObject, which are the OData formatters serialize/deserialize.

分享给朋友:
您可能感兴趣的文章:
随机阅读: