-
In the following example, I'll show you how to use the CodeSmith 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 is going to save the...
-
In the previous article on how to use the partial methods in the CodeSmith 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...
-
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 has worked hard on making...
-
I came across this bug last night, which was occurring right as CSLA4 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...
-
There may come a time where you need to rename a column in your generated entity for whatever reason. The following tip and trick article will show you how to quickly accomplish this. Let's assume you have a generated property for the column AccountId and it is defined like this: [System.CodeDom...
-
We recently released a new major version of the 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...
-
We have been working with Microsoft over the past few months to ensure that CodeSmith works with Visual Studio 2010. The currently released version of CodeSmith 5.2.1 already supports Visual Studio 2010 Integration. Although the current support is titled as beta we have ran into very few Visual Studio...
-
During the development of our CodeSmith CSLA templates we have spent a lot time unit testing the generated code to ensure everything was working correctly. In the future we would like to generate basic CRUD unit tests for any project. We decided to unit test the PetShop database to go along with our...
-
This article will help you upgrade your solutions templates safely and easily to the latest major or minor version. The latest templates can be found on our Google code project and the latest nightly build can be found here . The first thing to do is to download the template framework you wish to update...
-
In a previous post I had mentioned that we added SQL CLR Stored procedures as well as SQL Functions in the release of CodeSmith 5.2. Since then there has been a few questions since then on how to add this to your existing templates. The great news is, you can add the functionality in a few easy changes...
-
CodeSmith now supports SQL Functions and SQL CLR Functions with the release of CodeSmith 5.2. I will quickly show you how to add SQL Function support to your template. The first thing you need to do in order to use SQL Functions is to set the IncludeFunctions Property on any type that derives from SchemaObjectBase...
-
Recently I built a CodeSmith sample UITypeEditor that allows a user to enter in custom data into a DropDownList. In the following article I’ll show you what you need to do in order to build your own UITypeEditor. First you need to create a public class that will hold the data of the drop down list...
-
During each release of CodeSmith, one thing we always do is test upgrade scenarios between each versions and check for backwards compatibility among other tests. Recently, I was amazed at how much change has taken place between CodeSmith 4.x and the latest CodeSmith 5.1.x release when it comes to the...
-
Over a week ago we released our new CSLA Templates. I highly recommend everyone that uses CSLA to try them out as they will save you a ton of time. Also you'll notice very quickly that it follows the CSLA best practices and has other features that you have been looking for like a working Data Access...
-
We have updated the Tips & Tricks: Debugging CodeSmith with the changes needed to debug on Windows7. Here is the quick overview of what you need to-do to enable debugging on a Microsoft Windows 7 machine: Update the Just-In-Time debugger setting DbgJITDebugLaunchSetting . The setting is found in...