Basically I’d like to do what LINQ does and load & save my objects without queries. Any tips?
It looks like I’m trying to emulate LINQ to SQL an Object Relational Mapping.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you are asking for looks like an Object-relational mapper with LINQ provider.
For instance, NHibernate ORM (my personal favorite) supports both PostgreSQL and MySQL. As of version 3.0 it has a built in LINQ provider.
Microsoft’s Entity Framework doesn’t have out of the box support for many database engines, as NHibernate has, but there are third party solutions. Btw, EF got open-sourced two days ago.
There’s an interesting site that compares various ORMs in .NET world – ORM Battle. There you can find a list of other popular ORMs and see how they compare to each other.
Some SO ORM questions:
https://stackoverflow.com/questions/132676/which-orm-for-net-would-you-recommend
Best ORM to use with C# 4.0
Also, micro-ORMs have recently risen in popularity. They don’t really offer a full object to database mapping, nor Linq support (most of them) but they could be a good tool for the job.