有人建议在其.NET ORM看看学习 [英] Some suggestions on which .NET ORM to look at learning

查看:201
本文介绍了有人建议在其.NET ORM看看学习的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有些惭愧地说,我从来没有使用一个ORM;你可能还记得我的大部分职业生涯经验的黑客周围的经典ASP和小.NET我做的往往是仅维护。

I am a little ashamed to say that I have never used an ORM; as you may recall most of my career experience is hacking around with Classic ASP and the little .NET I do tends to be maintenance only.

有关自己的职场生涯,以及在preparation在工作(在.NET做的终于来了!)我期待在增加一个ORM到我的技能一个新的项目 - 作为受虐狂我,我也要去看看TDD,而我在它这个项目。

For my own career as well as in preparation for a new project at work (done in .NET finally!) I'm looking at adding an ORM to my skillset - being the masochist I am I'm also going to look at TDD while I'm at it for this project.

不管怎么说,我使用.NET 3.5的项目(或计划,反正),所以我试图决定我要选择什么样的ORM;就像我说的,我没有真正熟悉他们,但我大致知道他们应该怎么做,他们是如何做到这一点。我的选择是基本上下降到NHibernate的或LINQ /实体框架。我没有使用任何,但我已经看到LINQ2SQL和NHibernate的一些演示。

Anyways, I am using .NET 3.5 for the project (or plan to, anyways) so I am trying to decide what ORM I want to choose; like I said I am not really familiar with them but I know generally what they are supposed to do and how they do it. My choices are basically down to NHibernate or LINQ/Entity Framework. I haven't used any, but I've seen some demos of LINQ2SQL and of NHibernate.

NHibernate的好像它是更强大的整体(LINQ2SQL甚至不是一个真实的ORM),以及在ALT.NET社会,我想探索更多地使用。然而,EF是微软的产品,正因为如此,会被大量使用,受到广大开发团队在那里只是用谁不管微软隆重推出,不看任何的替代品。

NHibernate seems like it's more robust overall (Linq2Sql isn't even a "true" ORM) as well as heavily used in the ALT.NET community, which I want to explore more. However, EF is Microsoft's offering and, as such, will be heavily used by the majority of development teams out there who just use whatever Microsoft comes out with and don't look at any alternatives.

我听说过这两个关于EF好的和坏的东西,但我想捡东西,这将使我一个很好的基础,也是看好其他雇主如果/当我发现在一家公司一个更好的工作与真正的开发团队。

I've heard both good and bad things about EF, but I want to pick something that will give me a good foundation as well as look good to other employers if/when I find a better job in a company with a real development team.

编辑:我要补充一点,如果有任何在挑选一个ORM,应用程序将不得不面对一个现有的数据库。

I should add that, if it matters any in picking an ORM, the application will have to deal with an existing database.

修改(二零零九年二月一十五日下午6点48分):将使用唯一的数据库是SQL Server 2005标准,Windows Server 2003的考虑,这是工作的一个项目上运行,我的目标是挑选东西,不会把我一个很长的时间起床速度(因为我将要成为生产和学习一门新的工具不会好看,以管理之),但东西会比我自己的滚动DAL更好。当时我还没有决定是否应用程序将是一个聪明的客户端或ASP.NET应用程序,但它的一个组成部分极有可能将要在ASP.NET MVC实现。

EDIT (02/15/2009 6:48 PM): The only database it will use is SQL Server 2005 Standard, running on Windows Server 2003. Given that this is for a project for work, my goal is to pick something that won't take me a very long time to get up to speed with (as I'm going to need to be productive and "Learning a new tool" won't look good to managemetn) but something that will be better than rolling my own DAL. At the time I haven't decided if the application will be a smart client or an ASP.NET application, but one part of it is more than likely going to be done with ASP.NET MVC.

推荐答案

我会建议NHibernate的 - 因为它是开源的,有一个非常活跃的社区的帮助是很容易得到。一个伟大的出发点是 NHibernate的常见问题解答,它的范围后对初学者非常先进的理念。遭受阅读运行,并按照地面<一href="http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/03/31/$p$ppare-your-system-for-nhibernate.aspx">$p$ppare您的系统NHibernate的和<一href="http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/04/01/your-first-nhibernate-based-application.aspx">Your第一NHibernate的基于应用程序。

I would recommend nhibernate - since it is open source and has a very active community help is easy to get. A great starting point is The NHibernate FAQ, it ranges from post for beginners to very advanced concepts. Hit the ground running by reading and following Prepare your system for NHibernate and Your first NHibernate based application.

这是我曾用过的NHibernate的ORM的在.NET和Hibernate的ORM在Java中所​​有的雇主 - 所以你应该很大NHibernate的学习受益

All employers that I worked for used NHibernate for ORM in .NET and Hibernate for ORM in Java - so you should benefit greatly from learning NHibernate.

这篇关于有人建议在其.NET ORM看看学习的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆