Writing
Psake Tab Expansion!
After installing the awesome posh-git stuff, I thought “it would be cool to have tab expansion for my psake tasks”. So, I read the posh-git stuff and decided it would be easy to follow the pattern they’ve used and adopt it for psake. Tha...
Ensure Spark Views Are Marked As Content With Powershell
I kept publishing a website project only to find each time a couple of spark files didn’t make it because they were not set as content in the cs project file. In order to limit the wasted time, I added the code below to the build script....
Mapping NHibernate many-to-many with a Class for the Joining Table
I wanted to have a many to many association in nhibernate so that additional info can be added to the joining table. Like the date the relationship was setup. I couldn’t quickly find anything on google, but then remembered that this is r...
Warming up to MVC2, Castle, and Spark with Red Yawk
Red what? Red Yawk (silent W), as in Red27 Consulting’s Yet Another Web frameworK. I’m not sure I really like the name, but it’ll work for now. I spent a good part of today trying to decide on what web framework to use for some upcoming ...
Resolve Lists and Arrays with Castle Windsor
I’ve worked with the Castle Project for a long time, primarily with Windsor. However, I often forget there are Array and List dependencies resolvers build-in, but they need to be wired up. This is mostly for my memory and hopefully it he...
Psake Builds and TeamCity Integration
Psake is a powerful build system, build on Powershell for a lot of functionality and familiarity. And TeamCity is a really nice continuous integration server, checkout the CodeBetter TeamCity install for a good demo. Hooking the two up w...
error CS1668: Warning as Error: Invalid search path ‘C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib’ specified in ‘LIB environment variable’
I’m not sure what caused my setup to produce this error, but after searching for a while and not finding any reason, I just added the lib directory and all was good. I was getting this when doing command line compiles and when using the ...
A New Year & A New Venture: Red27 Consulting
I’ve decided to take the plunge and start consulting full time. My company, Red27 Consulting, has been around for few years, but this year I will be pursuing consulting/independent development work full time. Red27 will be an agile/alt.n...
Making Sure A NHibernate IInterceptor Is In The Session
Building on the previous post Intercepting NHibernate to Handle Additional Database Work, I used the ILifecycle interface to ensure the IInterceptor was setup on the session before saving MyEntity. I ILifecycle interface is deprecated, b...
Intercepting NHibernate to Handle Additional Database Work
Today I needed to take addition database action when an entity is saved or deleted. A trigger might have been an option, but I try to limit the use of triggers. NHibernate to the rescue! Since the code was already using NHibernate it was...
N2CMS Build From Source
Download source Run Prepare_Dependencies-vs2008.bat Deploy_Everything-vs2008.bat Copy the output/Templates_Mvc directory to a new directory for the projects Edit permissions on the wwwroot sub folder to add IIS_USERS if needed. x64 onl...
FluentNHibernate Many-To-Many Mapping
Explained here Hackingon.net: Many-to-Many Relationships With Fluent NHibernate Automapping
Automating Releases with SFTP
I’m trying to automate the deployment process for a website. I’m using Psake for the build process and Migrator.Net for the db migrations. Which left the problem of getting the code to the server. I’ve taken a stab that this using this g...
Asp.Net MVC CheckBoxList HtmlHelper Extension
I added some more methods to the code provided by Tyler Garlick’s CheckBoxList for ASP.net MVC to allow a dictionary to be passed in place of a list of SelectListItems and an optional list of selected ids. Anyway, here’s the full class. ...
Spark T4 Templates For S#arp Architecture
Here’s a quick conversion of the Views to Spark views for the CurdScaffolding of S#arp Architecture V1. I’m still new to T4 and Spark, so they might need some adjustment, but they seem to work ok for a simple entities. SparkTT.zip
NHibernate String Enumeration Mapping
Here’s what’s needed to have NHibernate map an enumeration by the enumeration name instead of the number.
NHibernate Session Per Request Using Castles WcfFacility
I was under the false impression that the NHibernateFacility would handle session by request, needed for lazy loading collections, when used with the WcfFacility in an IIS setting. This might work if you use ASP.NET compatibility mode, h...
Unit Testing WCF Security with Castles WcfFacility
Building off David Tchepak’s post “Faking WCF Authentication”, here’s some code to override the Service Host creation when using the Castle WcfFacility. The main integration points are a custom IWcfServiceModel and IServiceHostBuilder us...
Getting Started With The Spark View Engine
Here’s some quick notes for getting started with the Spark View Engine on ASP.NET MVC, including setting up a container (Castle Windsor). Spark Reference the Spark assemblies Spark.dll, Spark.Web.Mvc.dll, and SparkLanguage. Configure...
Changing The FluentNHibernate Id Conventions
FluentNhibernate provides a bunch of Convention interfaces and base classes to override the default conventions. In this case our database naming requires Id columns to include the table name like ProductId for the Products table. Also, ...
NServiceBus 1.9 to 2.0 Upgrade Issues
Here’s some notes about breaking changes we ran into upgrading from 1.9 to 2.0 of NServiceBus. The distributor. This was mostly due to the fact that we had our own TopShelf implementation and had to remove that stuff. The auto loading o...
Overriding NServiceBus Configuration
I needed to override the default NServiceBus configuration (app.config/web.config). This turns out to be really easy with the 2.0 NServiceBus release. First, when setting up the Bus I needed to call CustomConfigurationSource(myCustomSour...
Setting the Powershell Console’s Title to the Current SVN URL
I'm testing out branching per feature, as such I wanted a way to know where my working directory was pointing. Since I'm using power shell I added some functions to my profile script to set the window title to the svn url. This doesn't a...
NServiceBus Distributor Overview
Overview The client sends messages to the distributors input queue on a remote machine. The server (or receiver) contacts the distributor asking for messages. As messages are sent to the distributor, it looks up the message endpoint in i...
N2cms Navigation Options on a MVC Site
Add the n2 SlidingCurtain control with a DragDropControlPanel control inside it after the opening body tag. This will link to the editing system of n2cms. <n2:SlidingCurtain ID="SlidingCurtain1" runat="server"> ...