数据访问层问题 [英] Data Access Layer Question

查看:78
本文介绍了数据访问层问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在修复以开始一项新工作,第一个项目是将VB6应用程序重写为VB.NET 4.5。我想知道您是否可以选择用于数据访问的内容。该数据库是MSSQL数据库。我已经在VB.NET工作了几年,并使用我们自己的自定义方法编写了针对mySQL的文章。我想知道我应该考虑的每种技术的优缺点。我研究过实体框架,但不是很熟悉。任何输入将不胜感激。谢谢,

I am fixing to start a new job and the first project will be a rewrite of a VB6 application into VB.NET 4.5. I am wondering if you had the choice what you would use for data access. The database is a MSSQL database. I have worked in VB.NET for several years and have written against mySQL using our own custom methods. I wonder what the pro and cons of each type of technology I should consider. I have researched entity framework but am not very familiar. Any input would be appreciated. Thanks,

推荐答案

很抱歉,但你的问题太模糊了,无法直接回答。



我'建议你从这里开始:教程1:创建数据访问层 [ ^ ]

使用ADO.NET为您的应用程序实现数据访问层 [ ^ ]
Sorry, but your question is too vague to answer it directly.

I'd suggest you to start here: Tutorial 1: Creating a Data Access Layer[^]
Implement a Data Access Layer for Your App with ADO.NET[^]


魔鬼详细介绍。

这取决于你的目标和资源(包括你的知识,经验和时间)。

基于自定义方法的DAL是不错的选择,但通常它是一种矫枉过正而不是提到很多编码。

花在学习EF上的时间很长,基于EF的DAL更快完成,b这不是没有瑕疵。

我热烈建议你选择类型数据集路径,我不得不使用它多年,它让我成为一个苦恼的人。

您可以决定学习其他ORM,但这远远超出我的范围。



PS

我同意Maciej Los关于你问题的模糊性。
The devil is in details.
It depends on your goals and resources (including your knowledge, experience and time).
DAL based on custom methods is good choice, but often it is an overkill and not to mention a lot of coding.
Time spent on learning EF is well spent, and DAL based on EF is faster to finish, but it is not without flaws.
I warmly suggest you NOT to chose typed data-set path, I had to use it for years and it made me an embittered man.
You can decide to learn some other ORM, but that is far beyond my scope.

P.S.
I agree with Maciej Los about vagueness of your questions.


这篇关于数据访问层问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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