CodeSmith C# 1.0.0 (Release Version)

CodeSmith C# 1.0.0 (Release Version)

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


rasupit posted on Wednesday, September 06, 2006

All,

CodeSmith Template Collection for C# is available for download at http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CSLAcontrib

Enjoy,

Ricky Supit

Jaans replied on Thursday, September 07, 2006

Woo-hoo... thanks Ricky!

Have you tried this against the test version of CSLA 2.1 ?

Skafa replied on Thursday, September 07, 2006

I have a feature request,

Could you add a delegate in DataPortal_Create ? so it will be possible to initialize the object with default values.

thanks!

rasupit replied on Thursday, September 07, 2006

Jaans, next release will target CSLA 2.1.  I hope to have it ready when Rocky release the 2.1 version or at least not too long after that.

Skafa, Starting from CSLA 2.0.1, you can initialize your object in Initialize method. Will this work for you?

Ricky

shadyboxmonster replied on Friday, September 08, 2006

Ricky -

I'm trying to generate an EditableRoot class using the getProject sproc from the PTracker database. 

It seems the @LastChanged timestamp parameter isn't being generated in the AddUpdateParameters method.

Is it just me?  Thanks for releasing these!!!

rasupit replied on Friday, September 08, 2006

Current template release does not support "first write wins" concurrency, that's why you @LastChanged is not generated during update.

My exprerience is that most application does not use this.  However if many people requested this feature than I don't see a problem adding this on future release.

Ricky

Jaans replied on Sunday, September 10, 2006

For our uses, if a setting on the template to enable "first write wins" optimistic concurrency were available, it would be very advantageous.

I agree with Ricky in that most of the time it's not needed or even over-kill, however most of the applications we deliver have one or two concurrency sensitive areas, and we certainly would benefit from it.

So yes please... but that's just us :-)

 

mikeclimbs replied on Sunday, September 10, 2006

I'm using the vb templates, but I would also like support for write first concurrency.

If most people aren't using write first, what are they using?

 

Thanks

Mike

 

rasupit replied on Tuesday, September 12, 2006

Mike,
Most people is using "write last wins" on concurrency resolution, which is actually not implementing any.

mikeclimbs replied on Wednesday, September 13, 2006

Thanks for the reply. 

I guess the idea is updates are rare, or the chance of 2 edits happening at the same time is unlikely why worry about it.

Mike

gius replied on Tuesday, September 12, 2006

I have a (probably stupid) question - where is the template for stored procedures? I can't find it in the released package.
PS.Thank you for the templates! Great work.

rasupit replied on Tuesday, September 12, 2006

Gius,
Template for stored procedure is not available with release version 1.0.  However, there are few of this template available on CSLA contrib.  You can download these templates directly from source code repository at http://www.codeplex.com/SourceControl/ListDownloadableCommits.aspx?ProjectName=CSLAcontrib

They are located under StoredProcs folder.
Ricky

Jaans replied on Thursday, September 14, 2006

Cooking with gas so far! - Thanks Ricky!

I might be wrong here, but I seemed to have found a bug with the EditableChild template for C# relating to the Data Accesss methods.

I have specified a parent for the template and resultantly the Insert and Update (internal) methods (with matching ExecuteInsert/ExecuteUpdate methods) accept a second parameter for this parent.

The problem is that the DeleteSelf (and matching ExecuteDelete) methods do not include this parent parameter.

In my understanding the Insert (with a parent specified) may need a Foreign Key (FK) to perform the insert, so conversely the Delete (with a parent specified) may also need a FK to remove the row.

Thanks

Jaans

rasupit replied on Thursday, September 14, 2006

Jaans,

Search for "EditableChild" and "parent" and you'll find number of threads discussing this.  Here is one that will answer your question. http://forums.lhotka.net/forums/thread/5082.aspx

HTH,

Ricky

Copyright (c) Marimer LLC