JMon
JMon

Reputation: 3447

Creating WCF Data Services from a Database

At the moment I have a website that is connecting to the database the old fashion way, ie through stored procs from a back-end. Now I wish to change all this to services, so that I can consume this data from different applications.

I wish to have your advice on what is the best way to do this since I am fairly new to WCF Services? My idea is to have a web app possibly in Silverlight, a WPF application, and maybe in the future a small Android app that connects to these services. I also wish to use Entity Framework as the ORM that drives the data.

Thanks for your help and time

Upvotes: 0

Views: 1038

Answers (1)

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364409

It depends on amount of logic you currently have in stored procedures. If stored procedures are simple CRUD (Create, Read, Update, Delete) you can use EF and WCF Data Services directly. Simple stored procedures can still be easily used with EF but once your stored procedures contains a lot of logic, temp tables, dynamic result sets, multiple result sets, etc. you will not be able to use them directly. You will have to either simplify them or rewrite them in .NET code on top of Entity framework.

Advantage of WCF Data services is OData protocol defined exactly for CRUD operations and it also add ability for client to define queries passed to the service to filter transferred result sets. If you go with custom WCF service you will have much possibilities but implementation will be much more complex.

Android is able to consume OData services.

Upvotes: 1

Related Questions