FluentMigrator Code Templates

May 17, 2011

A little while back I created some migrator.net code templates. Since I’ve now moved over to using FluentMigrator it seemed only reasonable that I port the templates for the FluentMigrator project as well. To use them simply take the zip file from here and drop it into C:\Users\username\Documents\Visual Studio 2010\Templates\ItemTemplates\Visual C#\ Once you’ve done that restart Visual Studio and you’ll be able to do File > New File > New Fluent Migration. Give the file a name and you’ll get a code file a little like this:

using System.Data;
using FluentMigrator;
namespace Domain.Migrations
{
	[Migration(201105171040337)]
	public class MyFirstMigration : Migration
	{
		public override void Up()
		{
			throw new System.NotImplementedException();
		}
		
		public override void Down()
		{
		    throw new System.NotImplementedException();
		}
	}
}

Which I happen to think is rather nice.

Discussion, links, and tweets

comments powered by Disqus

I'm a developer at Purplebricks and I sporadicaly tweet here. These posts in no way represent the views of my employeer.