views:

68

answers:

2

Are there scenarios where it makes sense to encapsulate a data access layer (of a ASP.NET webapplication) with WCF or WCF Data Services ? Makes it sense to use a Service inside the application ?

+3  A: 

Yes.

Any time you need to provide data access to remote client applications (other than your website).

For instance, if you want to provide an API for your web application so that developers can integrate your application with others in new/interesting ways.

Justin Niessner
+1  A: 

Certainly!

If you're using something like the Entity Framework as your data/entity layer, WCF Data Services can be a good option for exposing data and functionality to your remote clients.

If you want a web application to make AJAX calls to your server, having WCF Services within your web application can also be a good solution.

It really depends on what you want to do, how complex the application is, and the usage that you forsee for that application.

David Hoerster