fluent conventions

Adding conventions to the fluennt nhibernate mapping is as simple as:

				.Mappings(m => Configurator.UseMappings(m))

		public void UseMappings(MappingConfiguration mappings)
			mappings.FluentMappings.Conventions.Add(new AnsiStringConvention());

 /// Dont use NVarchar for any strings /// 

	internal class AnsiStringConvention : IPropertyConvention

		private static Type stringType = typeof(string);

		#region IConvention Members

		public void Apply(FluentNHibernate.Conventions.Instances.IPropertyInstance instance)
			if (instance.Property.PropertyType == stringType)


Warning: count(): Parameter must be an array or an object that implements Countable in /home/cselian/public_html/blog/wp-includes/class-wp-comment-query.php on line 405

Leave a Comment