views:

27

answers:

1

I have a number of web application projects in a .net environment that use web services created by my DBA to select, update, and delete data from my SQL database.

My DBA suggests that he will continue to create new web service interfaces for new projects in the future. I understand that this process is somewhat inefficient in terms of performance. I think that he likes this because it gives him more control over the database, which is his responsibility, after all.

I was wondering if entities would generally be a more efficient way to communicate with my SQL database.

Is there anyone who is familiar enough with these two approaches to tell me which one is more appropriate to use in the future? And why?

+2  A: 

You can expose EF entities via WCF Data Services (formerly ADO.NET Data Service), which is a collection of server and client libraries that simplify creating and consuming REST-based web services using OData protocol. So, using EF does not preclude you from using web services. The two are not really comparable. EF is an ORM tool. Web services are a way that you access your data objects, whatever shape the latter may take.

WCF Data Services are very powerful, and I would recommend you use them, but only if you have a reason to. You need to consider your goals: Are you consuming your application only internally? Then you probably don't need web services. Or will you have multiple clients across the Internet that tap your database? Then web services are on the menu.

Antony Highsky
@anthony, the web service calls are all being done strictly internally.
Rice Flour Cookies
Well, you certainly will have more control if you call your data layer directly without going through web services. Both EF and Linq to SQL have some overhead, but I doubt it's enough to offset the performance gains you will have from cutting out the web services. So, I would place the DAL/BLL in class libraries by themselves, and reference them directly in your project. If occasion calls for it, you can later overlay WCF Data Services over top of these.
Antony Highsky