如何生成基本形成以快速编辑数据库条目? [英] How to generate basic form to edit database entry quickly?

查看:193
本文介绍了如何生成基本形成以快速编辑数据库条目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法我可以生成在WPF的WinForms或窗口的形式,可以插入数据库表/编辑的条目?
如果快捷方式不存在,你可以分享你的经验,我怎么可以用最少的努力做到快。

Is there a way I can generate form in WinForms or window in WPF that can insert/edit entry in database table? If shortcut doesn't exist can you share your experience how can I do it quickly with least effort.

我有一个大的项目中,我有花了很多时间模型的数据库,我希望跳过视觉设计部分,尽快然后当我有时间做设计正确完成申请。

I have a large project in which I have to spend lots of time modeling database and I wish to skip the visual design part and complete the application as soon as possible and then when I have time do the design right.

推荐答案

有一些工具,有可以为您生成这样的形式恕我直言,最好是CodeSmith中。

There are a number of tools out there that can generate such a form for you imho the best is "Codesmith".

有烘焙到Visual Studio中被称为T4
(A模式/代码生成系统的 http://msdn.microsoft.com/en-us/library/bb126445.aspx ),它是不是非常有据可查的,但一旦有效你的工作通过自己的方式吧。

There is a pattern/code generation system baked into Visual Studio called "T4" (http://msdn.microsoft.com/en-us/library/bb126445.aspx) that is not terribly well documented but effective once you work your way through it.

如果你想在系统中,您可以使用各种SQL函数可以列出一个表在数据库中的表,字段更多的控制(和每个字段...的数据类型),等等,等等,并推出自己的,它真的不是那么难。

If you want more control over the system, you can use various sql functions to list the tables in a db, the fields in a table (and the datatype for each field...) etc. etc. and roll your own, it really isn't that hard.

干杯,
CEC

Cheers, CEC

这篇关于如何生成基本形成以快速编辑数据库条目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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