Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save timgthomas/559557 to your computer and use it in GitHub Desktop.
Save timgthomas/559557 to your computer and use it in GitHub Desktop.
Define a custom SQL type in a Fluent NHibernate mapping file
public class FooMap : ClassMap<Foo>
{
public FooMap()
{
Table("Foo");
Id(f => f.Id, "Id").GeneratedBy.Identity();
Map(f => f.CustomField).CustomSqlType("varchar (60)");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment