MicroLite icon indicating copy to clipboard operation
MicroLite copied to clipboard

Change the configuration API to use an instance class instead of a static class

Open TrevorPilley opened this issue 10 years ago • 0 comments

We will move from the old static API:

Configure.Fluently().ForMsSqlServer("")...

To a newer instance based API:

var config = new SessionConfiguration();
config.UseLog4Net();
config.UseMsSqlConnection("")

The Listeners, Logger, Mapper and Type Converters will all be specified in the Session Configuration which will allow different databases within a single application to have different Listeners, Mappers and Type Converters rather than them being global e.g:

config.InsertListeners.Add(new CustomDeleteListener());
config.UseConventionMapping(ConventionOptions.Default); // or new ConventionOptions { ...}

TrevorPilley avatar Sep 23 '15 09:09 TrevorPilley