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!

4

1 に答える 1

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.

于 2011-09-06T20:57:26.797 に答える