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);
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s