An ORM newbie asks...

Thread is closed for posting
2 posts, 0 answers
  1. Stuart Hemming
    Stuart Hemming avatar
    1622 posts
    Member since:
    Jul 2004

    Posted 17 Jun 2012 Link to this post

    I've just watched the video "Managing the OpenAccess ORM Context in ASP.Net Webforms Applications".

    Can someone, ideally using short words (I'm not that bright) tell me the pros and cons of each option?

    I can see the advantages and disadvantages of the MasterPage approach, but why should I choose with of the other methods over it? Or either of them over the other?

    Curious of Grantham.
  2. Damyan Bogoev
    Damyan Bogoev avatar
    581 posts

    Posted 20 Jun 2012 Link to this post

    Hi Stuart,

          Using the approach the ContextFactory pattern can lead to problems related to the key calculation in 64bit environment and disposing of resources issues. 
           Master page is better approach because it will be created, used and disposed in page’s lifecycle. This will avoid all possible resource issues related to their disposing.
           Best approach which you could use is short-living context. In this scenario a context instance is being created, used and disposed only when it is needed.
    Hope that helps.

    Damyan Bogoev
    the Telerik team
    OpenAccess ORM Q2'12 Now Available! Get your hands on all the new stuff.
Back to Top