6

My C# Windows Service ( It's a service, not a MVC web application!) needs to talk to MYSQL database. In order to ease my data layer effort I am thinking about using an ORM for this purpose.

So which .Net ORM works most well with MYSQL database? NHibernate? Subsonic? Entity Framework ? LINQ2SQL? Or others?

Edit: I use .Net 3.5

Edit 2: Open source solution preferred.

Graviton
  • 81,782
  • 146
  • 424
  • 602

5 Answers5

7

I'm completely biased, but I'd go NHibernate. I've managed, with some tweaking, to get the same DAL code working with Access (for CD delivery), Sql Server (for corporate), and MySql (for the laugh of it). This is a few years back now, and I did have to make sure that the field/table names were valid in all environments. Other than that NHibernate did the rest - brilliant.

MrTelly
  • 14,657
  • 1
  • 48
  • 81
5

I cannot believe no one has mentioned Rob Conerys SubSonic!! This should be required studying for all ORM users. Sure NHibernate has its supporters, great tutorials and alot of good points. But Subsonic also generates the DAL for you automagically and leaves you to the business of the business layer, testing and presentation layers.

jake
  • 1,435
  • 2
  • 14
  • 22
0

I prefer LLBLGen.

BobbyShaftoe
  • 28,337
  • 7
  • 52
  • 74
0

For mysql specifics NHibernate has a small issue with zero value dates in mysql. Since I've only used it with MSSQL and postgres I can't tell if it's anything to worry about.

If you have experience with Hibernate or other ORMs from Java or other languages NHibernate or ActiveRecord (based on NHibernate) will feel very familiar.

Matt
  • 74,352
  • 26
  • 153
  • 180
Vasil
  • 36,468
  • 26
  • 90
  • 114
-1

I would stay away from the entity framework or LINQ to SQL for that matter for tiered development. That being said i haven't tried either LLBLGen or NHibernate.

user81206
  • 217
  • 1
  • 4