What effect do the following Session options have? DisableAutoLoad, DisableAutoReload, DisableAutomaticTransactions?

For the last option, does that only throw an exception in the case where you query for entities and iterate through them without opening a transaction? Or does it also disable the automatic transactions wrapped around all public entity type members?

For example, if I have a Customer entity with a public method called DoSomething(), will DO wrap a transaction around any call to customer.DoSomething() even if DisableAutomaticTransactions is set to true?

asked Nov 24 '10 at 23:57

ara's gravatar image

ara
395858791


One Answer:

All these options work only in offline mode of Session.

  • DisableAutoLoad disables the ability of automatically fetch the objects, that aren't cached in Session.
  • DisableAutoReload disables the ability of automatically refreshing the state of an object in the subsequent transactions.
  • DisableAutomaticTransactions blocks any attempts to automatically create a transaction in offline mode. I.e. it implies they should be created manually.

Most likely, you don't use offline mode - it is a kind of legacy stuff in v3.X. DataObjects.Net.Offline namespace API replaces it.

answered Nov 26 '10 at 06:05

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA