C#引用数据库中的所有表而无需在.dbml中拖动表 [英] C# refer to all the table in the database without the need to drag table in .dbml

查看:98
本文介绍了C#引用数据库中的所有表而无需在.dbml中拖动表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个与linqtosql有关的问题以及如何使用该表。发生了什么事情我喜欢拖放方法,但我拥有的数据库包含500多个表,那么我将如何在设计器中将它们全部拖放到表中,或者有没有办法连接到表数据库并立即获取所有表?

So I have a question related to linqtosql and how I can use the table. WHat happen is I like the drag and drop approach, but the database that I have contain more than 500 tables, then how am I going to drag them all in the designer to get access to table, or is there a way to connect to the database and get all the table in at once?

推荐答案

而不是Linq to sql classes选择Ado.net Entity DataModel模板并选择从数据库生成 你可以按照自己的意愿去做。
Instead of "Linq to sql classes" choose "Ado.net Entity DataModel" template and choose "generate from database" and you can do it as you want.


这篇关于C#引用数据库中的所有表而无需在.dbml中拖动表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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