CodeSmith Generator

2 minute read

While implementing a custom CodeSmith Generator Template Editor into Visual Studio 2010. I ran into an issue with getting the GoTo Line functionality to work properly. According to Microsoft this functionality needs to be provided by the custom editor as well as the GoTo Line dialog will need to be implemented as there is no “official public extension point”. This makes sense if you are taking over control of the editor but I feel that Microsoft should expose this dialog. I was able…

5 minute read

The following guide will walk you through the basics on how-to extend the CodeSmith Generator PLINQO Templates to fit your custom development needs. In this example we will create a new Webpage for each entity that we generate. This page will contain a LinqDataSource control and an ASP.NET GridView control that will display data from a corresponding entity that we generated. I always recommend that you use the PLINQO API when writing templates that interact with code generated by PLINQO as this…

6 minute read

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…