Hi!
The download does not seem to work.
It starts downloading the Zip file but then nothing happens.
Sarosh
I successfully downloaded the updates. When I extract the files, they are extracted to <myLocation>\CSLAcontrib\CodeGenTemplates\CodeSmith\CSLA20, and the template comments indicate that these templates were "generated using CSLA 2.0 CodeSmith Template Collection". These may be minor issues that should not affect the resulting code, but I am seeing other issues as well with 2.1.
I am using the new CSLA2.1 RTM, and when I attempt to load an object I get the following error:
Csla.DataPortalException: DataPortal.Create failed (System.NotSupportedException: Invalid operation - create not allowed at Csla.Core.BusinessBase.DataPortal_Create()) ---> Csla.Server.CallMethodException: DataPortal_Create method call failed ---> System.NotSupportedException: Invalid operation - create not allowed at Csla.Core.BusinessBase.DataPortal_Create()
If I change the generated factory "new" method from
Public Shared Function NewCustomer() As Customer Return DataPortal.Create(Of Customer)() End FunctionTo:
Public Shared Function NewCustomer() As Customer Return DataPortal.Create(Of Customer)(New Criteria(Guid.NewGuid)) End FunctionThe object works. I believe the factory new method changed as a part of 2.1, and it may have changed since the templates were last updated.
Thanks!
AaronEngel,
The code that you have posted is vb code, I'm pretty sure it did not get generated from c# templates.
I suggest you to contact the author or create a new thread regarding this issue. I'm afraid that your post on this thread may not raise attention from the author.
Ricky
rasupit:The code that you have posted is vb code, I'm pretty sure it did not get generated from c# templates.
Ricky, I downloaded from your link and there's some VB stuff in there under CSLAcontrib\CodeGenTemplates\CodeSmith\CSLA20\VB
Maybe that's what AaronEngel is referring to?
Thanks for the templates!
Mike
Is available. Here is the link http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=CSLAcontrib
I also change the link on the top of the thread.
Ricky
Thanks for all your good work on this! And - thanks for letting CodeSmith add these templates directly to the next release of their product.
I'm trying to add some features to the templates (I'll contribute the changes when done), but I'm new to CodeSmith. I have 3.2 professional. I made a change to the Template.cs file and saved it, but the changes don't show up in the generated code. What do I have to do to get it to recompile?
Found the problem. Me being stupid. :)
Did find this link, however, which might help those who actually do have the problem I thought I had...
http://community.codesmithtools.com/forums/thread/9450.aspx
"One minor annoyance if you are working on your base template class. Codesmith seems to have a tendency to get an out-of date version stuck in its template cache here: \Documents and Settings\All Users\Application Data\CodeSmith\v3.2\Template Cache"
I've got the first cut done on the extension that adds in comments that describe the individual properties. Have to test it with xml input files, views, stored procs instead of tables to see how it handles things.
Copyright (c) Marimer LLC