CodeSmith templates for c# - 0.9.5 is available

CodeSmith templates for c# - 0.9.5 is available

Old forum URL: forums.lhotka.net/forums/t/791.aspx


rasupit posted on Wednesday, August 02, 2006

Templates can be downloaded at http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CSLAcontrib

Enjoy,

Ricky Supit

skagen00 replied on Thursday, August 03, 2006

These are really useful, thanks for your hard work.

bobhagan replied on Thursday, August 03, 2006

    The templates are terrific.  But, I've run across something I can't figure out.
 
I recently reformatted my drives and reinstalled everything.  The v9.4, and now 9.5 templates when run always say, "the extended properties table has not yet been created". The readme said this was optional.  I had previously commented out the methods using extended properties (I'm using Oracle and dont need identity columns) and had them return false. That worked then.

I can't find any other mention of extended prperties using search.  I ran the script to create an extended properites table in Oracle system instance.  No help.
I have SQL Server - where should the table be created? 

Thanks
Bob Hagan


rasupit replied on Friday, August 04, 2006

Bob,

I don't use oracle db, so may not be able to help you much on this. Hopefully, somebody that had use CodeSmith template with Oracle db will be able to help you.

I'm not sure which method that uses extended property that you've commented out to make your template works.  I wasn't expecting you'll get error message from the following method since it check for null first:

public static bool IsIdentity(DataObjectBase col)

{

if (col.ExtendedProperties["CS_IsIdentity"] == null) return false;

return (bool)col.ExtendedProperties["CS_IsIdentity"].Value;

}

Ricky

bobhagan replied on Monday, August 07, 2006

It's that one and IsCalculated.  The message is from inside CodeSmith, because I commented these methods out completely, and the template wouldn't compile.

I didn't remember where I'd seen the explanations - it wasn't from your readme, but from the Oracle Provider readme. The config file has settings to run the script but I didn't know where the script to create the table should go. I ended up running the scripts directly and created the table in my instance. 
Now it works.  Seems like you really have to have this table, whether you use it or not.

Thanks. Back in business

Bob Hagan

rasupit replied on Monday, August 07, 2006

Chaim,

I believe the templates that come with CodeSmith Studio is for CSLA 1.x.  There have been numerous updates for that version which you can find it on CodeSmith forum at http://community.codesmithtools.com/forums/thread/1689.aspx.  

 The current version on http://www.codeplex.com/Wiki/View.aspx?ProjectName=CSLAcontrib is targeting CSLA 2.x (the ones with object names …list)

 Bob,

I'm glad you got it working, sorry could not be much of a help

Ricky

burmajam replied on Tuesday, August 08, 2006

Hi there,

Can these templates be used with MySQL? As far as I remember last time I've tried templates, I couldn't name tables from MySQL to generate code.

rasupit replied on Tuesday, August 08, 2006

Hi Burmajam,

This templates has never been tested with MySQL, however you might search in http://community.codesmithtools.com/forums/ on how to make CodeSmith template work with MySql.  I think you may need to modify the template to use schema provider at http://community.codesmithtools.com/files/9/schemaproviders/default.aspx

Not much of a help but hope to get you started.

Ricky

brembot replied on Saturday, August 12, 2006

Any CodeSmith templates for VB? Thanks

Allann replied on Monday, August 14, 2006

I have just updated CodePlex with the VB templates.  They include all the 0.9.5 changes and a few extra enhancements.  See the release notes for details.

Note these templates are used to build CSLA 2.1 business objects, a test build released by Rocky.

Chaim replied on Monday, August 07, 2006

Can you please clarify...

I'm using the templates that come with the CodeSmith Studio, so is your code supposed to be an update on those templates? since i see you're using different namespaces (different object names .... list vs. collection)

what gives?

[since i want to contribute some fixes to the current templates, so I need to know which is more current or used]

Copyright (c) Marimer LLC