开发者

Can an ORM be use for a system where the access is thru methods that returns DataTables?

开发者 https://www.devze.com 2023-01-16 11:25 出处:网络
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.

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号