0

I'm using VS 2008 and .NET 3.5 framework.

I've already played a bit with XmlSerializer. I've added attributes in the business object classes like

[System.Xml.Serialization.XmlRootAttribute()]

and so forth, and it works well. It's a relatively thin mapping interface from the object structure to the XML structure.

Is there a similar procedure for doing this with objects to MySQL tables and records -- that is, something short of defining two separate frameworks for each business object? We're already using the MySQL ADO.NET driver: http://www.mysql.com/products/connector/. I'm trying to decide now whether I want to make the jump to something like NHibernate, or try to work with the more domain-specific MySQL driver.

Thanks in advance!

John
  • 15,990
  • 10
  • 70
  • 110
  • 1
    Not really sure what you're asking but it sounds like you asking about ORM's. Take a look at PetaPoco/Simple Data/Dapper or Massive. PetaPoco gets the thumbs up from me. They create POCO's or dynamic objects that relate to your tables and then return IEnumerable in query results – Jon Sep 06 '11 at 20:58
  • Jon: Yes, ORMs are closer to what I'm looking for. I don't really have *that* many classes but every little bit helps I suppose. :) – John Sep 06 '11 at 21:10

1 Answers1

2

If plain ADO.NET is not good enough for your requirements, you may checkout Dapper* before jumping into more heavy artillery like NHibernate an EF.

*requires .NET 4.0

There are also other lightweight ORMs such as Massive and PetaPoco that are also worth checking out.

Darin Dimitrov
  • 1,023,142
  • 271
  • 3,287
  • 2,928