RadControls version
|
2009 Q2 |
Telerik OpenAccess ORM version |
2010.1.414.3 |
.NET version |
3.5 SP1 |
Visual Studio version |
2008 |
programming language |
C# |
browser support |
all browsers supported by RadControls
|
PROJECT DESCRIPTION
This
is an example of how a so called 'context factory' is implemented. The .zip file contains 3 projects:
1) Model (Data Model)
2) Repository (BLL)
3) Website (UI)
It uses the Northwind database on a SQL2005 server.
The basic idea is to have a few repositories for each 'set of
entities'. So for example an 'OrderRepository' contains functionality
to get 'Orders' from the database, but also the 'OrderDetails'.
The only thing that is needed to get a repository together with an active scope (that is based per Http Session) is to call this:
1 ArticleRepository repArticle = ContextFactory.Get<ArticleRepository>(Session.SessionID);
So then the ContextFactory is asking the RepositoryFactory to return a
repository of the type 'ArticleRepository' using the 'active scope' for
a particular session.
UPDATE:The most recent version of this project can be found in the Software Development Kit, which you can download
here. In case you have questions related to this project, please use the
support ticketing system.