w0051977
w0051977

Reputation: 15817

DotNetNuke Data Tier

I am trying to understand the Dot Net Nuke source code. Can anyone provide a brief explanation of how the data tier is implemented?

I am trying to find in the code where the stored procedures are called.

I have reviewed some of the video tutorials online and I have read some blogs, but I have not yet found my answer.

Upvotes: 0

Views: 546

Answers (1)

Bruce Chapman
Bruce Chapman

Reputation: 1247

The DotNetNuke 'data tier' is the DotNetNuke.SqlDataProvider

The data layer uses an abstracted 'DataProvider' model, where the actual provider is determined at runtime. In practice, this is usually the SqlDataProvider, which uses the Sql Server database as the datastore for DotNetNuke.

In theory, you can write a dataprovider to allow access between the DotNetNuke application and any type of database or data store, by writing a different implementation of a data provider. I think there may have been an oracle one written a long time ago, but just about every install uses Sql Server as the data store.

The SqlDataProvider has traditionally sat on top of the Microsoft.ApplicationBlocks.dll component, so the actual stored procedure calls are performed through this layer.

Most modules and other extensions to the DotNetNuke core also use their own specific data provider implementation, although it has become common practice to build in the Sql data layer into a single assembly for simplicity.

You will find most stored procedures are executed and then passed back through the CBO objects for translation from IDataReader result sets into specific objects.

To find an example, I would choose one of the bundled core modules and study that, like perhaps the Html/Text module.

Finally, with the advent of DotNetNuke 7, the Data Provider model is in for the first major revision since DotNetNuke 1.0 shipped, the Data Access Layer 2 (dal2). I recommend reading some of the blogs by Charles Nurse on this:

Charles Nurse Blog : Entries for 'dal2'

Upvotes: 3

Related Questions