用于生产系统的 DBLinq?
我们正在开发一个带有 C# 代码的 ASP.NET Web 应用程序。数据库是MySQL 5.1,使用InnoDB。数据访问层使用 ADO.NET 调用存储过程,然后根据结果集构建各种数据结构(无对象映射)。这工作得很好,但有点冗长。
毫不奇怪,我们在设计第一个版本的数据模型时犯了一些错误,但这些经验让我们变得更聪明,我们决定重构数据模型。我们不必更改数据访问层,但我们也在考虑对此的选择。
如今,我们很难忽视 ORM 工具的流行。我们感觉自己落后了很多,或者是因为不熟悉他们。不仅如此,我们还设计了一个对象模型来很好地描述我们的数据模型。我们考虑的主要 ORM 工具是 NHibernate、ADO.NET Entity Framework 和 LINQ to SQL。我们更喜欢 LINQ 而不是 SQL,因为我们(在 SO 上)读到它比完整的 ORM 工具更轻量。
我们认为使用 ORM 工具的一个缺点是学习曲线,但我们已经可以看到使用 LINQ 如何减少我们必须编写的代码量,从长远来看,这可以节省我们的时间。但是,我们使用的是 MySQL,而不是 SQL Server。
所以我的问题是,DBLinq 对于生产系统来说是否足够好?或者,LINQ to SQL 是否是我们转向 SQL Server 2008 的一个足够令人信服的理由? 顺便说一句,我更喜欢使用 SQL Server 而不是 MySQL,但成本是明显的缺点。使用 BizSpark 3 年后,我们将需要支付 6,000 美元。或者,我们应该考虑其他 ORM 工具吗?或者,我们应该忽略炒作而不使用 ORM 工具,但也许可以利用 LINQ 到数据集?
我搜索了有关 DBLinq 的信息,但只找到了 17 个带有 DBLinq 标签 的问题,所以它没有似乎很受欢迎。
编辑
看看dotConnect for MySQL 支持 LINQ,因此这是另一种选择。
谁能说说该驱动程序在编写 LINQ 查询方面的表现如何?
We're working on an ASP.NET web application with C# code behind. The database is MySQL 5.1 using InnoDB. The data access layer uses ADO.NET to call stored procedures and then builds various data structures out of the result sets (no object mapping). This works fine, but it is a little verbose.
Not surprisingly, we made some mistakes when designing the first version of our data model, but the experience has made us smarter and we decided to refactor the data model. We don't have to change our data access layer, but we are considering our options for that as well.
It's been difficult for us to ignore the popularity of ORM tools these days; we feel like we are way behind or something for not being familiar with them. Not only that, but we have already designed an object model that nicely describes our data model. The main ORM tools we would consider are NHibernate, ADO.NET Entity Framework, and LINQ to SQL. We would prefer LINQ to SQL because we have read (on S.O.) that it is more light weight than full ORM tools.
We think one drawback to using an ORM tool is the learning curve, but we can already see how using LINQ could reduce the amount of code we will have to write, which could save us time in the long run. However, we are using MySQL, not SQL Server.
So my question is, would DBLinq work well enough for a production system? Or, is LINQ to SQL a compeling enough reason for us to make the move to SQL Server 2008? Incedentally, I'd prefer to use SQL Server over MySQL, but cost is the obvious drawback. After 3 years on BizSpark, we'd be on the hook for $6K. Or, should we consider other ORM tools instead? Or, should we just ignore the hype and not use an ORM tool, but maybe take advantage of LINQ to DataSet?
I searched S.O. for info on DBLinq, but only found 17 questions with the DBLinq tag, so it doesn't appear to be popular.
EDIT
Looks at though dotConnect for MySQL has support for LINQ, so that's another option.
Can anyone speak to how well that driver works for writing LINQ queries?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查 bl-toolkit。它是免费的、速度非常快并且有很好的 LINQ 支持。最新添加的是用于从数据库生成数据模型的 T4 模板。
Check bl-toolkit. It's free, very fast and has great LINQ support. Newest addition are T4 templates for generating your data model from database.