Database helper class?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
4/27/2009 11:11:50 AM
Gravatar
Total Posts 2

Database helper class?

Hi Joe,

  Is there a helper class for DB access? Maybe something that uses interfaces?

Something like:

IDbConnection conn = DBHelper.GetSiteConnection(SiteID);

IDbCommand = conn.CreateCommand();

Best wishes,

Patrick

4/27/2009 5:56:55 PM
Gravatar
Total Posts 2

Re: Database helper class?

I'm sorry, I guess what i'm asking is how does the framework know what connection a site is using.

I'm creating a simple "Suggestion Box" module using the Sample Module project as a guide. Right now i'm just using SqlLIte by grabbing the connection string from the ConfigurationManager and using the SqliteHelper class to perform the work.

Upon further thought, i was wondering how to extend this module to other databases, but i don't know how to tell what connection the site is using to grab the neccessary sql and call the right HelperClass (or perform the work myself).

If you someone could point me to some code to look i'd really appreciate it. I've poked around, but it seems to elude me.

Best Wishes,

Patrick

You must sign in to post in the forums. This thread is closed to new posts.