Some people have developed tools called ORM (Object Relational Mappers) utilities, which can make it easier to map database tables, views and other relational objects to an OOP class. They can explore the database´s shema and create the wapper custom entity and domain object classes for you.
Some of them work at design time and others work at runtime to perform this mapping function on-the-fly. The problem here is that sometimes they don´t work as well as we´d like them to, and there can be a considerable learning curve to set up these tools to work with some particular database and usage requirements.
Some of them don't have the basic support for joins or for stored procs !!
Some popular tools for .NET are:
Note: This is a very simple list and you can add more here.
Some of them are too expensive and others are free! If you use one particularly O/R Mapper build by you and want to share it... dont be afraid ....I love to use it :)
I am trying to find one simple O/R Mapper that have support for joins and for stored procs. The O/R Mapper must work with SQLServer, MySQL and ...
Suppose that I will use your favourite O/R Mapper tool, how you do this :
SqlCommand oCmd = new SqlCommand("My_StoreProcedure");
oCmd.CommandType = CommandType.StoredProcedure;
oConn.Open();
oCmd.Connection = oConn;
oCmd.Parameters.Add("@MyPar", SqlDbType.Int).Value = myPar;
oCmd.ExecuteNonQuery();
oConn.Close();
Note: Is only to see how easy is to use your favourite O/R Mapper ;P You can translate this sample or you can put your sample using stored procedures or simple SQL queries text.
Express your own opinion about these or other O/R Mapper tools and explain how easy is to use it. Talk also about them learning curve.
What I'd like to see here is your opinion base on your own experience. :p