目前推荐用于 ASP.net 的哪个数据访问层?

发布于 2024-07-15 20:31:08 字数 453 浏览 9 评论 0原文

I'm currently building a small website where I write down problems that arise and answers to them for others to see. Currently I'm using a DAL much like the one described here. Now I have been looking at other models, and in particular linq based models using Linq2SQL and the ADO.net Entries framework. I realize I'm moving the data access to the code layer in a way since I'm then filtering out for example a toplist with linq queries. The reason I started doing this was because the DAL was not really syncing up with the DB at all times and nullable types became not nullable when I changed something in the DB. Then if I would reimport the tables into the data table my queries would be lost.

My simple question is really, if you want a good DAL for ASP.net today, what would that be? Suggestions, experiences are more than welcome.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

记忆で 2024-07-22 20:31:08

我个人更喜欢 LINQ to SQL 和 < strong>ADO.NET 实体框架。 微软人员也在他们的最新项目中使用了这些技术(看看 KOBE 项目为例)。 因此,微软也推荐这两个。

虽然..有时,当我需要最大限度地控制时,我会使用 企业库 中的数据访问应用程序块和手动 DAL 编码它的功能和实现。

其他替代方案是:NHibernateSubSonic,不同的 ORM 解决方案,例如 LLBLGen Pro


关于此主题的好书:


相关工具:

  • LINQPad 也是学习 LINQ 的好方法:它预装了书中的 200 个示例,C# 3.0 简介。 没有比这更好的方式来体验 LINQ 和函数式编程的魅力了。

I personally preffer LINQ to SQL and ADO.NET Entity Framework. Microsoft guys also use those technologies in their latest projects (take a look at KOBE project for example). Thus, Microsoft recommends those two as well.

Though.. sometimes I use Data Access Application block from Enterprise Library and manual DAL coding when I need maximum control over it's functionality and implementation.

Other alternatives are: NHibernate, SubSonic, different ORM solutions like LLBLGen Pro.


Great books on this subject:


Related tools:

  • LINQPad is also a great way to learn LINQ: it comes preloaded with 200 examples from the book, C# 3.0 in a Nutshell. There's no better way to experience the coolness of LINQ and functional programming.
丢了幸福的猪 2024-07-22 20:31:08

有很多选择,根据您的具体情况,每种选择都可能更好。 一些选项包括:

  • LINQ to SQL
  • ADO.NET 实体框架
  • NHibernate
  • SubSonic
  • 手动编写一个:)

我的默认选择是 LINQ to SQL。 但这完全是个人喜好。 许多人都是 NHibernate 的拥护者。

There are many options and each of them might prove better depending on your specific circumstance. Some options include:

  • LINQ to SQL
  • ADO.NET Entity Framework
  • NHibernate
  • SubSonic
  • Writing one manually :)

My default choice is LINQ to SQL. It's a completely personal preference though. Many guys are NHibernate advocates.

动次打次papapa 2024-07-22 20:31:08

我在当前项目中使用 OPF3,主要是因为它对 Pervasive.SQL v9.5 具有出色的支持。 支持也很棒。

I'm using OPF3 for my current project, mostly because it has excellent support for Pervasive.SQL v9.5. The support is fantastic, as well.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文