我目前正在学习 C# 和 LINQ.我有很多关于他们的问题.基本上,我需要一个循序渐进的教程.
I am currently learning C# and LINQ. I have lots of questions about them. Basically, I need a step by step tutorial.
我想 dbml 文件是数据库的配置文件.如果我双击 dbml 文件,VS 将在设计图中打开它.我可以在这里创建/删除/修改表吗?我可以使用 add new item 添加 LINQ to SQL Classes 以获得 dbml 文件?
I suppose the dbml file is the configuration file of the database. If I double click the dbml file VS will open it in a design diagram. Can I create/delete/modify tables here? I can use add new item to add the LINQ to SQL Classes to get a dbml file?
接下来是什么?在数据库中生成表?生成 SQL 脚本?生成cs文件?什么时候?怎么样?
What's next? Generate tables in database? Generate SQL script? Generate cs files? When? How?
DBML 文件与数据库服务器完全无关.这完全是客户端的事情.它本质上是关于数据库中的表以及如何将它们映射到 .NET 对象的一组信息.
The DBML file is not related to the database server at all. It's a completely client side thing. It's essentially a set of information about your tables in the database and how you're going to map them to .NET objects.
当然,您可以从数据库中拖出一个表并让 Visual Studio 自动为您推断一些信息,但更改文件不会影响数据库.您也可以在没有任何数据库的情况下从头开始创建 DBML 文件.
Of course, you can drag a table from a database and have Visual Studio infer some information for you automatically, but changing the file will not affect the database. You can create a DBML file from scratch without any database too.
在内部,DBML 文件只是一个 XML 文件,它由 Visual Studio 提供给自定义工具,并从中生成表示数据库的 LINQ 对象模型的 .cs 文件.
Internally, the DBML file is simply an XML file that's fed into a custom tool by Visual Studio and generates .cs files representing the LINQ object model for your database from it.
这篇关于C# dbml 文件来自哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
LINQ to SQL:如何在不检索整个实体的情况下更新唯LINQ to SQL: how to update the only field without retrieving whole entity(LINQ to SQL:如何在不检索整个实体的情况下更新唯一字段)
string1 >= string2 未在 Linq to SQL 中实现,有什string1 gt;= string2 not implemented in Linq to SQL, any workaround?(string1 gt;= string2 未在 Linq to SQL 中实现,有什么解决方法吗?)
如何在条件下使用 RemoveAll 删除列表中的多个项目How to Remove multiple items in List using RemoveAll on condition?(如何在条件下使用 RemoveAll 删除列表中的多个项目?)
转换表达式树Convert Expression trees(转换表达式树)
当 IDENTITY_INSERT 设置为 OFF 时,无法为表“ClientCannot insert explicit value for identity column in table #39;ClientDetails#39; when IDENTITY_INSERT is set to OFF(当 IDENTITY_INSERT 设置为 OFF 时,
Linq 独特的 &最大限度Linq distinct amp; max(Linq 独特的 amp;最大限度)