tags:

views:

170

answers:

5

I'm looking for a good ORM for an upcoming project.

The database will have around 1000 to 1200 tables, and it will be in Both SQL Server and Oracle, which will be used depending of customers enterprise needs. Also a few part of the project will work with WCF services. I want a designer or something like that. Good support of LINQ. Acceptable performance.

I have tried DataObjects.Net but it doesn't have any designer. We can't code all that tables nor use code generator. And I'm not sure if DataObjects.Net supports switching database. Also I'm familiar with EF4 but it can't support both databases together, and switching databases manually(modifying the edmx file) is such a pain in ... for maintenance job.

Thanks in advance.

Edit: Seems OpenAccess and LLBLGEN Pro have designer but I don't have experience with them.

+2  A: 

Given this information I would suggest to look into NHibernate (and/or fluent-nhibernate).

The item you will have to look into is performance. This depends heavily on the nature of your application. 1,000 to 1,200 tables sounds massive, so I'd recommend to definitely run a number of meaningful performance tests (in addition to all the other tests) before you finalize the decision.

Edit: In fact the better starting place for NHibernate is NHForge (Thanks, Justin!).

John
Why NHibernate? In order to decrease database modeling to objects time, we want to use a designer or etc. Does NHibernate have any designer?
Salar Khalilzadeh
According to these tests http://ormbattle.net/ NHibernate doesn't act good comparing to others.
Salar Khalilzadeh
@Salor - It depends on the category, NHibernate does better in some than others and vice versa.
Travis Heseman
@Salor: I think ormbattle.net is a useful site as long as you take it with a pinch of salt. Have a look who created that site and what they do as their fulltime job. - To your first comment: Designer support - in my view - is only one of the factors to consider, some listed by ormbattle.net some not. There are many more and it depends on your situation which you consider and how you weigh them.
John
LLBLGen v3 can be used as designer for NHibernate and EF
Matt
+6  A: 

I would still vote for Entity Framework v4 - EF4.

After all:

  • you can have multiple EDMX files, no problem - one for SQL Server, one for Oracle

  • you could put those into their own class library, and then load or, or the other, or both, if needed, at runtime (e.g. by using the Managed Extensibility Framework or something of your own)

  • you can easily target those EDMX files at databases using connection strings - really not hard at all

marc_s
I second @marc. EF4 has designer support and good linq support and @marc's idea of keeping 2 EDMX files could ease the pain of multiple RDBMS support.
Sruly
Actually if you have about 1200 tables, you should really not have just 1 edmx file. That would never work performance wise, considering all the tracking that the context would need to do.You will still need to have multiple edmx for both oracle and sql server.
Stephane
@Stephane: yes, good point - each EDMX shouldn't have a lot more than about 200 or so tables. Usually it's not all that difficult to partition your app into groups of 200 (or less) tables
marc_s
That's good point, thanks. I'm going to use my own generator to generate POCO classes to pick one of EDMX files for each database which is going to be used.And yes, we will definitively use separated EDMX files for different subsystems.
Salar Khalilzadeh
@Salar: In case you are interested, there is a [POCO T4 template](http://visualstudiogallery.msdn.microsoft.com/en-us/23df0450-5677-4926-96cc-173d02752313) in the visual studio code gallery that you can use (or modify to suit your needs).
Simon P Stevens
+1  A: 

I would also suggest NHibernate but the place to research it is definitely NHForge:

http://nhforge.org/

Here is the high-level feature overview (including LINQ):

http://nhforge.org/wikis/howtonh/nhibernate-features.aspx

There are a few designers available, including LLBLGen Pro:

http://nhforge.org/wikis/general/commercial-product-ecosystem.aspx

NHibernate 3 is in alpha now but I know that it is already being used in production a few places. That might be the best way to go for a new project.

Justin
@Justin: Yes, I agree. The better place to start is NHForge. I'll update my answer accordingly.
John
+1  A: 

I think you'll need to pick your ORM and designer tool separately. For example, go with EF and LLBLGEN, or NHibernate and CodeSmith, or NHibernate and LLBLGEN, etc.

Travis Heseman
Good point, I'm going to use my own generator with EF4.
Salar Khalilzadeh
+1  A: 

OpenAccess can also do the job for you. You could use the multiple .rlinq files and assembly-per-database approach as suggested with Entity Framework. The benefit I see for you would be the support you will get from Telerik as there is quite a chance for you to hit a rock or two while developing a solution of such proportions.

Zoki