In the following example, I’ll show you how to use the CodeSmith Generator CSLA template’s powerful renaming options. Many of you might have a legacy database with those ugly prefixes, or things you wish you could refactor but just can’t. Luckily, you’re in luck as CodeSmith Generator is going to save the day once again! By default we will strip any invalid characters from your property names like prefixed digits etc… Please note that these methods also work for…
CSLA
In the previous article on how to use the partial methods in the CodeSmith Generator CSLA templates to preserve custom code mostly focused on the code side of things. For those of you who might be using Stored Procedures might be wondering… How do I accomplish preserving my custom stored procedure logic? Don’t worry, CodeSmith already though of this and didn’t leave you out in the dark! The CSLA templates by default will not automatically execute the generated stored…
One of the best features of code generation is the reality of being able to actively generate you code while preserving custom changes. This allows you to implement custom logic while constantly making changes to your metadata and getting the latest template changes. CodeSmith Generator has worked hard on making this happen in both the PLINQO and CSLA Templates. The CSLA templates offer many partial method overrides to make your life easier. It is recommended that you place any partial methods…
I came across this bug last night,
which was occurring right as CSLA 4
was released. It had to deal with the
CodeSmith CSLA templates
when you set UseMemberVariables
to true
. The error is quite obscure and not
very intuitive as the signs of a bug are only found when you check to see if
your business object IsValid. The scenario in this case is when you set a
required managed property, the rules never fully evaluate the set value. A
bunch of other side effects could occur as well. Here is the…
We recently released a new major version of the CodeSmith Generator CSLA templates that add support for many new features including Visual Studio 2010, CSLA 4.0 and Silverlight 4.0 support. They can be downloaded here. When upgrading to the templates and you are going from CSLA 3.8 to the latest CSLA 3.8.4 templates, there really aren’t any changes you need to make other than updating your CodeSmith Project File template location to point to the new version of the templates. The easiest…