tags:

views:

721

answers:

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 (haha)? LINQ2SQL( no, this can't be the choice, can it be?)? Or others?

Edit: I use .Net 3.5

Edit 2: Open source solution preferred.

A: 

I prefer LLBLGen.

BobbyShaftoe
Good solution... but unfortunately it's not free
Ngu Soon Hui
Oh, I didn't know you wanted free. :)
BobbyShaftoe
A: 

I've asked a question like this before see:

http://stackoverflow.com/questions/132676/which-orm-for-net-would-you-recommend

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.

Vasil
+5  A: 

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
*I did have to make sure that the field/table names were valid in all environments*Mind to elaborate more so that I know how to avoid those pitfalls...
Ngu Soon Hui
Brendan Kowitz
I used NHibernate in my project-- and what a great experience!
Ngu Soon Hui
We've been working with Fluent NHibernate, and it's very easy to use.
ripper234
A: 

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.

+1  A: 

Mindscape Lightspeed

chefsmart
+3  A: 

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