Monthly Archives: August 2016

Upgrading to MicroLite 6.3

MicroLite 6.3.0 has been released on NuGet, the main changes in this release are detailed below.

New Convention Mappings

There are now 2 new helper convention mappings:

  1. ConventionMappingSettings.LowercaseWithUnderscores – Maps a Pascal Cased property name to an underscore separated lower cased column e.g. a property called ‘CreditCard’ would map to a column called ‘credit_card’
  2. ConventionMappingSettings.UppercaseWithUnderscores – Maps a Pascal Cased property name to an underscore separated upper cased column e.g. a property called ‘CreditCard’ would map to a column called ‘CREDIT_CARD’

DateTime mapping

The default mapping for System.DateTime is now System.Data.DbType.DateTime2. If you need to change it back to System.Data.DbType.DateTime do the following:

// In startup code (before calling Configure.Fluently()...):

// Reset the DbType mapping for DateTime:
TypeConverter.RegisterTypeMapping(typeof(DateTime), DbType.DateTime);
TypeConverter.RegisterTypeMapping(typeof(DateTime?), DbType.DateTime);

XDocument mapping

The default mapping for System.Xml.Linq.XDocument is now System.Data.DbType.Xml. If you need to change it back to System.Data.DbType.String do the following:

// In startup code (before calling Configure.Fluently()...):

// Reset the DbType mapping for XDocument:
TypeConverter.RegisterTypeMapping(typeof(XDocument), DbType.String);

MicroLite 6.3

MicroLite development has been quiet for a while, although I have some plans for version 7.0, they are quite big and as part of that is moving to support .NET Core it’s a way off. In the interim I’m planning another build for version 6 which will pull some of the quicker and easier changes which were waiting for 7.0.

The biggest change will be that the support for databases other than MS SQL will be moved into separate libraries which reference the third party drivers explicitly. The only real impact will be pulling in MicroLite.Database.<DbType> in addition to MicroLite if you use MySQL, PostgreSQL etc.

To see what else is to be included, view the milestone for 6.3

Edit 24 Aug 2016: The split for databases into separate projects will now not happen until MicroLite 7.0 to avoid introducing a breaking change in 6.3