Data Access Layer and CodeSmith

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.
1/16/2007 1:09:19 PM
Gravatar
Total Posts 3

Data Access Layer and CodeSmith

Hello,

Do you have any documentation or tips related to updating the data access layer in order to support a new, custom module using new  tables?   I am working on a custom module but I don't understand how I should update dbPortal.cs to provide data access to my tables.  I noticed a reference to CodeSmith and am trying to figure out how to use the templates with a trail version.  I just downloaded a trial version of 4.0 but I get a lot of errors when attempting to compile your templates.

Any advice or documentation is appreciated!
1/16/2007 1:37:04 PM
Gravatar
Total Posts 18439

Re: Data Access Layer and CodeSmith

Hi,

I'm not sure about the Codesmith 4 problems as I'm still using Codesmith 3.x. Maybe they changed it and 3.x scripts aren't compatible. Not sure if/when I will upgrade to Codesmith 4.x

I would recommend that you do not put your custom data access methods in dbPortal.cs. If you want to be able to stay up to date with the latest mojoportal code from svn you should leave that file alone. You can compile it into the same assembly but at minimum you should put your code in a separate file dbMyCustomFeature.cs or whatever you want to name it. That way you can do svn update and get the latest mojoportal code without any merge conflicts

I do plan on doing some documentation on using the Codesmith templates as soon as I can get to it but it sounds like a version problem. If the script was working for you I think it would seem fairly obvious how to use it.

Hope it helps,

Joe
2/6/2007 5:37:41 PM
Gravatar
Total Posts 18439

Re: Data Access Layer and CodeSmith

Hi,

I recently rebuilt my dev machine with Vista and decided to upgrade to Codesmith 4. I created a new folder for Codesmith4x templates and copied the ones from the previous version in there thinking I would have to modify them.

However when I tried it, it worked fine without needing any changes so I don't think you were having a version related issue.

The only thing required is to have a connection and select a table and the script runs for me. I will be doing a tutorial soon on developing modules for mojoPortal and I will cover using the Codesmith templates included with mojoPortal source code.

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