When I set out to write my ORM, I had two guiding principles:
1.) Loose Coupling was key. I wanted the result of the ORM to be loosely coupled, and I wanted any dependencies the ORM had to be loosely coupled as well.
2.) I wanted 1 and only 1 query language – and that was LINQ.
Now, the ORM I started, I doubt, will see the light of day because of several reasons – but mostly because I don’t have the time to support another open source project. One is taxing enough for any mere mortal.
But in my quest to add LINQ, I had come acrosss Matt Warren’s IQueryable Provider series on his blog. Well, the beauty of that project has now been refactored and is now available on CodePlex as the IQToolkit. Matt’s refactorings are great and add a lot of flexibility to the product. So, if you need to add LINQ syntax to something, or wish to write a Linq2MyTechnologyHere implementation, then you’ll also be happy to know that the IQToolkit is licensed under MS-PL, which is pretty permissive.
How hard was it to get the pre-toolkit version of the IQToolkit to work with my ORM? It took me about 10 minutes of searching and then about 10 minutes of implementing the section of code that defined the properties to lookup. With the new toolkit version, there is an ability to add your own mapping implementation very easily (check ImplicitMapping for the stock implementation). Great work by Matt on this one!
Happy Thanksgiving!
While writing this, I was listening to "Northern Downpour" by Panic At the Disco