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 we开发者_Python百科b 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?
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
精彩评论