Thorsten,
I was planning to add stored procedure template but I have not able to spend time on this. This summer, It has been a struggle for me to choose between working on template and golf or other outdoor activities. It very hard to pass on the latter
I think modifying an existing will be the quickest approach. In fact, I think I'll do this and hopefully include this on the next release.
Ricky.
Gents
I've modified the StoredProcedure template that is included with CodeSmith a little bit. Hopefully this can be a starting point for tweaking it further. I would like to upload it (perhaps make it part of the CSLA Contrib. on CodePlex) so that the community can help improve it further.
So far it generates stored procedures with the same naming convention as that which CSLA Template 0.9.5 currently generates ("Add<TableName>";"Get<TableName(Plural)>"; etc). I have also made some crude but fast changes so that when a table has an identity column (or GUID) that the stored procedure that is generated, uses the "New" prefix (as per the CSLA template). I hope this helps you out a bit.
How do we make this part of the CSLA contributions on CodePlex ?
Thanks!
Great thanks ! Sounds good to me...
I'll drop you an email with the template.
Regards
Jaans
Hi All,
I see that the CSLAExpress VB templates generate stored procedures as well - Is anyone using these? Or maybe take a look at them and collaborate on some ideals?
Thanx!
Julian
I started using the CSLA Express VB templates last week, as
I only had CodeSmith 2.6 at the time and the other set didn't work with it
(they have been fixed now though).
On the whole the templates are very good, and as you have noticed generate stored
procedures based on the CSLA model plus a few other niceties such as error
code checking etc.
You can also opt to use SQL Transactions and it will modify the sprocs
accordingly (although I haven't tested these).
There is a bug in the current release regarding concurrency checking but I have
been in touch with the author, wcm777, and I believe he is going to upload some
fixes into CodePlex.
The CSLA business objects that are generated are very similar to the book and
based on 2.0.2. All the logic and template output is stored in the
CSLAExpress20.vb file, and it is very easy to open up and debug directly in
Visual Studio (the VS project is included with the templates).
At the moment I think there are good bits to both sets of templates (split-base
and xml file support in one, sprocs and good seperation in the other etc) so I think I will
probably end up combining the best of both worlds, at least for my own needs...
Regards,
Dan.
thilker:Hi!
Great work!
The only thing I'm missing is a template to create the stored procedures that fit the generated BOs.
I found a template in the codesmith scheme "DatabaseSchema". It is quite ok, but not perfect.
Greetings!
Thorsten
Yah I have been hacking thru that ....
I may put together my edits and share them soon....
I have modified the proc_names and how a few columns are managed
also took some of the code from the tracker sample app and added it to the template
I am working thru generating some BO classes now so I can see if my Proc's and BO's match up and work w/o major problems :-)
Hi there Thorsten
Did the stored procedure template get uploaded anywhere?
I don't seem to be able to find it on CSLAContrib.
Kind regards
Rob
I really like the CSLA framework, but the naming convention used in the sample application for stored procedure names is not one of them.
The format is "Add<ThingName>", "Update<ThingName>", etc.
I prefer "<ThingName>Add", "<ThingName>Update", etc.
That way, when I look in the database at the list of procedures, I see all the <ThingName> procedures sorted together. It makes it much easier to notice if I forgot one (or intentionally didn't create one).
Hi,
Do you have any idea why am I getting this error in CodeSmith 2.6 when I open the .cst file?
---------------- Compile started -----------------
(448,8): error CS0117: 'SchemaExplorer.TableSchema' does not contain a definition for 'HasPrimaryKey'
(472,5): error CS0162: Unreachable code detected
Build complete -- 1 errors, 1 warnings
---------------------- Done ----------------------
Build failed
Thanks!
Copyright (c) Marimer LLC