开发者

What are Disconnected ORM and Connected ORM

开发者 https://www.devze.com 2023-01-10 14:17 出处:网络
Could any body clarifythese two expression 开发者_开发问答for me ? What are cons and pros of each one?

Could any body clarify these two expression 开发者_开发问答for me ?

What are cons and pros of each one ?

// I've just worked and familiar with CodeSmith and Linq to sql among all ORM Tools

Thank you


It refers to whether you can disconnect the database session and still expect the entities to be "alive". In disconnected ORMs you can disconnect and reconnect a database session (e.g. between web page requests) while retaining entity objects (e.g. in a web session state).

Personally I prefer not to work in disconnected mode (I'm mostly using NHibernate), because although it seems to simply things there will sometimes be side effects that are tricky to debug.


Well here are some cons to maintaining a connection to your database for an increased length of time:

  1. memory on the database to maintain the connection
  2. tying up a connection from the pool, which may be a finite resource
  3. concurrency issues due to locking data

Convenience might be a pro.

0

精彩评论

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