dbml file - create database(dbml 文件 - 创建数据库)
问题描述
我正在尝试使用 BA.dbml 文件(Linq to Sql)创建一个数据库.我知道我必须创建 DataContext 并创建数据库.但我不知道该怎么做.我是否必须在 BA.cs 文件中创建 DataContext.
I am trying to create a database using BA.dbml file (Linq to Sql). I know I have to create DataContext and create the database. But I don't know how to it. Do I have to create DataContext in the BA.cs file.
这可能是多余的帖子,我很抱歉.
It might be redundant post, I am sorry for that.
推荐答案
查看这些博客文章,展示如何创建 dbml 文件,然后从该 dbml 文件创建数据库.
See these blog posts showing how to create dbml file and then create database from that dbml file.
http://weblogs.asp.net/ashicmahtab/archive/2008/11/21/linq-to-sql-dbml-more-than-just-for-accessing-a-db.aspx
http://msdn.microsoft.com/en-us/library/bb399420.aspx
这篇关于dbml 文件 - 创建数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:dbml 文件 - 创建数据库
基础教程推荐
- 带更新的 sqlite CTE 2022-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
