views:

26

answers:

1

We have a system (third party) where we access a web service to read data from its underlying database that returns .Net DataTable objects and in some cases even DataSet.

The system sometimes (depends on the web method) accepts the modified DataTable/DataSet to update/insert/delete data.

Other times, some web methods only have parameters for update/insert/delete (they call a store procedure behind the scene).

I'm trying to decouple this web service from our application and I was thinking that maybe an ORM would be one possible solution.

However, for what I could read on the internet it seems that the ORM needs direct access to the database which we don't have.

So, is there an ORM that could fit this scenario?

A: 

The way to decouple it is to:

  • Create Data Transfer Objects (DTO'S)
  • Use DTO's in all your services
  • The first level of your service should be a facade that maps the DTO's to whatever objects you use in your data access technology
Shiraz Bhaiji
So, using DTO is there a way to use an ORM? The reason I'm evaluating an ORM solution is because it provides a lot of functionality (caching, lazy loading, transactions).
Stecy