A while ago, I started a small project which needed to access an Sql database. Since the project was quite small I didn’t want to go with the overhead of implementing a fully fledged ORM framework. Looking for alternatives, I came across ‘micro ORM’ frameworks. PetaPoco and Massive were the two I played about with and found that there were things I wanted to do which were difficult to achieve with either. As a result I decided to write my own and made it open source.
MicroLite was conceived with a number of principles in mind.
- It should be simple to configure.
- Code using it should be easily testable in isolated unit tests.
- It should not use any external dependencies outside the .net base class libraries.
- It should be extensible, allowing users to choose how it interacts with other frameworks (for example logging).
- You shouldn’t have to inherit from any MicroLite classes or implement any MicroLite interfaces for your data entities.
- It should be simple to map classes to tables without having complicated and hard to maintain XML documents.
It has been inspired by various other frameworks that I have used in the past. Having used NHibernate for a number of years, I wanted to create something that was similar so that it was easy to move between the two. Let’s be clear though, MicroLite is not a cut down implementation of NHibernate. It does not use any of the NHibernate codebase, rather it uses some similar concepts and interface names (e.g. ISession).
Over the next few weeks I will be publishing more blog posts showing some of the features and things I am working on.