开发者

Creating WCF DataService with database other than SQL Server

We would like to expose data we have residing in a Vertica database via the WCF Data Services. (Ultimately, we want to access the data in Excel's pivot t开发者_运维百科ables features, and I've created an Excel Workbook project in Visual Studio to consume this data).

While I can access the Verica data in server code using the ADO.NET provider from Vertica -- I cannot find anywhere to get the WFC DataService code to use a different provider.

Do you know how I can create a WCF data service using a database that is not SQL Server?


Basically WCF Data Services exposes anything that implements the IQueryable interface (for read operations) or the IUpdatable interface in addition, if you want to update/insert data.

Both those interfaces are "wrapped" into yet another layer of interfaces (IDataServiceQueryProvider and IDataServiceUpdateProvider) - but in the end, that's what your data source needs to

Entity Framework or Linq-to-SQL both support those interfaces on their data/object context classes - so you can easily expose them using WCF Data Services.

For more information:

  • MSDN docs on custom WCF Data Service providers
  • Using WCF Data Services with custom data source
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜