我应该在Visual Studio中使用数据向导? [英] Should I Use the Data Wizard in Visual Studio?

查看:139
本文介绍了我应该在Visual Studio中使用数据向导?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Visual Studio 2008与几个数据源(主要是SQL Server 2008 Express和Visual Foxpro)进行交互。

I'm using Visual Studio 2008 to interface with several data sources, mostly SQL Server 2008 Express and Visual Foxpro.

我应该使用数据源配置向导还是我应该使用代码构建自己的Connection,DataAdapter,DataSet,Command和DataTable?什么因素应该影响我的决定?

Should I use the Data Source Configuration Wizard or should I build my own Connection, DataAdapter, DataSet, Command, and DataTable using code? What factors should influence my decision?

我通常走代码路线,如果它给我更多的力量或控制。但是,根据经验,我知道某些产品(如SBS 2008或SonicWall)使用内置向导不仅是首选,而且几乎是强制性的。

I usually go the code route if it gives me more power or control. However, I know from experience that there are certain products (like SBS 2008 or SonicWall) where using using the built-in wizards is not only preferred but almost mandatory.

推荐答案

与编写应用程序相比,开发人员花费更多的时间来维护应用程序。因此,该决定应基于可读性和可维护性。

Developers spend much more time maintaining the application as compared to writing them. So, the decision should be based on readability and maintainability.

向导生成的代码在某个时间点必须被理解;无论是复杂性增加还是版本更改。

The wizards generate code which has to be understood at some point in time; either when complexity increases or when version changes.

我建议尽可能使用手写,干净的代码。除非工具/库使整体代码小得多。

I would advise using hand written, clean code as much as possible. Unless the tool/library makes the overall code much smaller.

这篇关于我应该在Visual Studio中使用数据向导?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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