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

Posted by Community Admin on 03-Aug-2018 02:49

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

All Replies

Posted by Community Admin on 26-Sep-2010 00:00

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?


Posted by Community Admin on 27-Sep-2010 00:00

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

This thread is closed