Reputation: 1
We have a large web application that uses multiple databases (all currently MS SQL Server 2008 R2). This application is around 7 years old and was built around the EntitySpaces framework. It's currently using version 2009 of this framework, written using .NET in C# and targetting .NET 3.5
Now that ES is no longer around we have a need to change this to something else and are having problems deciding what to use.
Our database schema is very mature and works perfectly for us. The application is installed in over 80 sites across the UK.
Ideally we'd like a similar ORM tool that we can just point to the existing database schemas and generate our business and data acess layer classes. We don't mind about updating to a higher .NET framework if necessarry.
Our application makes use of both the Entityspaces objects and also call some stored procedures to provide reporting functions. This is something we cannot change so the ability to call parameterised stored procs is essential.
My question is - Has anyone had any experience of doing this and can anyone recommend any tools to use to try out?
Thanks in advance, Andy
Upvotes: 0
Views: 286
Reputation: 24515
I have use CodeSmith extensively, and can hightly recommend it: http://www.codesmithtools.com
I used Codesmith for a few years, creating my own implementation using the CSLA.NET framwork, these days however I use T4 Templates with the Entity Framework, which works very well. I would recommend EF and T4 templates if you want to use EF and Codesmith if you want to build your own ORM based on your own architecture or something similar to that of ES.
Upvotes: 0
Reputation: 4758
I would definitively recommend you to have a look at ServiceStack.OrmLite!
It fits exactly to your needs as it maps a POCO class 1:1 to an RDBMS table.
It allows you to call Stored Procedures, comes with T4 templates to help you out with the code generation part and it’s really simple and pretty fast!
Upvotes: 0
Reputation: 29786
Entity Framework would be the obvious choice as Microsoft's own ORM. It definitely supports mapping to stored procedures, and generating models from databases (aka. "Database First" in EF parlance).
You mentioned that you use multiple databases - this makes things more complicated (in any ORM) - as a word of advice, there is absolutely nothing wrong with creating multiple models in EF, especially if you line these up with your bounded contexts.
Julie Lerman's books are probably the best resource for learning EF: http://www.amazon.co.uk/s/ref=nb_sb_ss_c_0_12?url=search-alias%3Dstripbooks&field-keywords=julie+lerman&sprefix=julie+lerman%2Caps%2C211
There are also lots of courses available at Pluralsight.
Upvotes: 1