Bogdan Gusiev
Bogdan Gusiev

Reputation: 8305

ORM frameworks

I need to collect some information about existing ORM solutions. Please feel free to write about any programming language.

Can you tell about the best ORM framework you ever use and why is it better then others?

Upvotes: 5

Views: 1456

Answers (6)

baHI
baHI

Reputation: 1570

With ORM there are multiple possibilities, all depends what you want.

As a real ORM mapper I strongly recomment NHibernate and Fluent NH mappings. You need a lot of research to put together a nice architecture, but then nothing stands in your way. With minimal compromises you get real flexibility.

EF6x (core is not prod.-ready IMHO) is called an ORM, but what it generates is more closer to a DAL. There are some thing's you can't do effectively with EF6. Still, this is my favorite tool for a read-model, while I do combine it with NHibernate (where NH I use for a DDD/write model).

Now to performance - its always pro and cons. If you deep deeper into ORM architecture (see my article: avoid ORM bad habits) then you will find intuitively the ways to make it faster. Here's my another article on how to make EF6x 5x faster (at least for read situations): EF6.x 5x faster

Upvotes: 0

Simple Fellow
Simple Fellow

Reputation: 4622

Im new to OpenAccess ORM and we are using two products. Reporting and OpenAccess. I think there are some features that people missed.

  1. OpenAccess uses graphical designers while nHibernate still uses handwritten xml files
  2. OpenAccess is not limited to SQl Server as EF4 and similiar frameworks

using it is easier and the forums are pretty helpful.

Upvotes: 0

Peter
Peter

Reputation:

LINQ2SQL was nice, EF makes sense, but is very complex and SQL Server oriented. NHibernate is special and Telerik OpenAccess (fully .NET / Visual Studio) got a broad set of functionality and professional support.

Since I know the product I can comment on Rohan's concerns:

  • Existing Views can be used and full Views support is coming up
  • Mapping more than one entity to the same table "works" for class hierarchies, limitation with reverse mapping exists
  • Inheritance and Interfacer support "do not require" changes to the the database schema, again limitation with reverse mapping exists though
  • Visual Designer will come, Forward and Reverse Mapping Wizards allow you already to do anything in an easy way
  • There is a workaround for the insert issue mentioned and it will be fixed generally

Check out the Telerik site to find happy customers and feel free to use the telerik forums and support resources for any question.

-Peter

Upvotes: 1

Rohan West
Rohan West

Reputation: 9298

I have been looking at Telerik Open Access for last few months, in genernal this ORM has been a pain to work with, it was advertised as having extensive linq support but in reality many of the linq features you would normally expect dont work server side and are performed on the client. I also had problems using multiple conditions in a where clause, see my last question. Here are a few things that i found

  • No support for views
  • Unable to map more than one entity to the same table
  • Inheritance and Interface support requires you to make changes to you database schema
  • No visual designer like LINQ to SQL and Entity Framework
  • If you want to perform an insert any related entities must be fetched first

Rohan

Upvotes: 2

alchemical
alchemical

Reputation: 13985

I found LINQ to SQL to be a pretty straight forward solution. The first time I used it, I'd say I had a basic ORM working within a few hours, and was creating LINQ queries with it.

Microsoft has an additional ORM (Entity Framework), which I've heard is more complex but may be useful for highly complex distributed applications with multiple data sources etc.

Overall I found LINQ to be an easy and fast to use ORM.

Upvotes: 3

Serhat Ozgel
Serhat Ozgel

Reputation: 23766

I used NHibernate and Entity Framework.

Current stable version of entity framework is very immature. It is too difficult, or impossible to perform common tasks. Testing your code is also difficult since you cannot really separate your entities from your data access classes. But it perfectly integrates with visual studio ide. Setting up is easy and updating all the models from database takes just a few seconds. Upcoming version of EF (4.0) will solve some of this problems.

NHibernate is quite powerful. It supports plain old clr objects, so you can work with simple entities. Configurations provide great control in great detail. Framework capabilities are satisfying and it has a large and active community and good documentation. Setting up and updating entities is a little difficult since you must use generators that looks up your database and generates entities and xml files. It may be tricky to find a generator or a template that exactly fits your needs. But once you set all things up, you will love it.

Upvotes: 6

Related Questions