views:

98

answers:

3

I started out at a medium sized financial firm, and everything was done using a home brewed ORM. I've recently moved to a web shop and it's a mix of ADO.NET and linq to sql. I'm wondering what other people are using at their shops, and why? Are you happy about this, or do you wish you were using another approach?

  • Do-it yourself using ADO.NET (sqlconnection, sqlcommand)
  • linq to sql
  • entity framework
  • nHibernate (or another non-microsoft ORM)

I'm not trying to start a flame war. This question is not about whether EF or nHibernate is a better ORM, it's simply what you're using at your company. I think it's interesting to know what other people are actually using in the real world.

+3  A: 

I work in the SQL Server group at Microsoft, and the recommendation going forward is to use Entity Framework over Linq to Sql or ADO.net (it's not my job to speak for the company, though, so don't take this as the ultimate official word).

Personally, I've only used ADO.net and LINQ to SQL on my projects thus far (lots of legacy code), but I do think Linq to SQL is much nicer than ADO.net, and from what I've learned about Entity Framework, it's even more powerful and convenient to use, so I'll be using it for all future DB development.

RyanHennig
Nah, nHibernate! EntityFramework doesn't work on mono, and will continue doing so for at least one other year. nHibernate is more mature, and besides, using an ORM mapper is more or less pointless if it doesn't work on another operating system. Who uses Windows uses MS-SQL, and who doesn't use MS-SQL needs performance, so certainly no ORM mapper, and who doesn't run Windows can't run EntityFramework...
Quandary
A: 

I don't know if it helps, but it just seems like you could use any of these on different projects depending on their size, needs, complexity, restrictions etc...Just using one is perhaps not the best approach...we use a mixture, hopefully selecting the best option for the project and that makes me happy...

you realise pretty quickly when it doesn't fit though!

davidsleeps
I'm not asking for the ideal, like you described, I'm asking for what your company does. Most companies I've seen tend to stick to one, instead of legitimately considering all approaches for each project.
manu08
For each of our projects, we weigh up how to access the database...that's what I'm trying to say...we don't always end up using the same library/solution. (small company).
davidsleeps
I'm jealous. At my place we tend to stick to a small set of solutions as people don't want to learn things like nHibernate.
manu08
+1  A: 

The first 2 are NOT an option anymore. The reason for not to go with the "Do-it yourself using ADO.NET" is obvious but for LINQ to SQL, I should mention that in November 2008, ADO.Net team announced that because EF & L2S target the same problems, going forward they would focus on developing the EF, which aligns with many of Microsoft’s upcoming technologies through its use of an EDM. Even though Microsoft is committed to maintaining L2S and has made no statements regarding deprecating it, it very well shows that L2S is in his way to retirement and Microsoft will strongly recommend the EF over L2S in future programmer guidelines.
nHibernate is a good "alternative" for EF but the problem is that the resources who know and can maintain a project with nHibernate are likely hard to be found on the market and that can cause issues. Feature wise, I don't think it's fair to compare these two since EF is a fairly new, 2 years old technology but nHibernate is a mature ORM has its roots on Java Hibernate framework being around for quite a few years.

Morteza Manavi
Many companies I know of are using ADO.NET directly for everything. It may be a bad choice, but it's certainly an option.
manu08