More in this section

Forums / General Discussions / How do you guys handle the model context in the SF backend?

How do you guys handle the model context in the SF backend?

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    26 Sep 2010
    Link to this post
    SF Devs...

    Are you using a PerRequestScope and disposing on Unload or App End?....or in each method are you creating and disposing the context object?

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    27 Sep 2010
    Link to this post
    Hi Steve,

    We keep data for the IObjectScope in HttpContext.Items and dispose them in SitefinityHttpModule - Context_EndRequest.  Each provider is created in a different object scope when you work directly with managers ( say PageManager, TaxonomyManager etc). When you create an instance of the default manager by uising GetManager method if the manager type is the same, this will not create a new object scope.

    When you work with fluent API and create an instance of multiple managers (say PageManager, TaxonomyManager etc) they will work in the same IObjectScope.

    If your data is coming from different databases this creates a new IObjectScope for each manager.


    Sincerely yours,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered