Dynamic Data linq to SQL Web Application
微软提供了一个数据驱动网站模板,可以自动生成CRUD页面,使用过程中碰到些问题
1.首先是如何应用,只需要创建个context并且在Global.asax里面加入下面这一句就可以了
DefaultMode.RegisterContext(typeof(ClassLibrary1.DataClasses1DataContext),newContextConfiguration()
{ ScaffoldAllTables = true
});
2.启动的时候提示不能debug,在web.config,只需要把debug="false"改成true
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Data.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
3.提示Unable to case object of type 'ClassLibrary1.DataClasses1DataContext'
to type 'System.Data.Object.ObjectContext'.
这是因为有两种Dynamic Data Entities Web Application和Dynamic Data linq to SQL Web Application,如果使用的context是System.Data.Linq.DataContext,那就要用后者才正确。
Asp.net dynamic Data web Site 之二创建第一个Web Site
http://www.cnblogs.com/neozhu/archive/2008/09/21/1295086.html
Unable to cast object to 'System.Data.Objects.ObjectContext'
http://forums.asp.net/t/1410035.aspx?Unable+to+cast+object+to+System+Data+Objects+ObjectContext+
Convert DBContext to ObjectContext for use with GridView
http://stackoverflow.com/questions/8059900/convert-dbcontext-to-objectcontext-for-use-with-gridview
Dynamic Data linq to SQL Web Application的更多相关文章
- Microsoft: Get started with Dynamic Data Masking in SQL Server 2016 and Azure SQL
Dynamic Data Masking (DDM) is a new security feature in Microsoft SQL Server 2016 and Azure SQL DB. ...
- Use Dynamic Data Masking to obfuscate your sensitive data
Data privacy is a major concern today for any organization that manages sensitive data or personally ...
- <转>LINQ To SQL 语法及实例大全
一篇很全很强大的linq to sql 总结 来源:http://blog.csdn.net/pan_junbiao/article/details/7015633 目录(?)[-] LINQ to ...
- web 存储方式汇总:Cookies,Session, Web SQL; Web Storage(LocalStorage ,SessionStorage),IndexedDB,Application Cache,Cache Storage
1 1 1 web 存储方式汇总: 旧的方式: Cookies; Session; Web SQL; 新的方式 HTML5 : Web Storage(LocalStorage ,SessionSto ...
- SQL Server 2016 的「動態資料遮罩 (Dynamic Data Masking)」
一些特別注重資訊安全.個人資料的公司或產業 (如: 金融.保險業),通常「測試用資料庫」的資料,會加上「遮蔽:去識別化」的功能,避免個資外洩.以往必須自己撰寫 SQL 語句或 Stored Proce ...
- Azure SQL Database (23) Azure SQL Database Dynamic Data Masking动态数据掩码
<Windows Azure Platform 系列文章目录> 我们在使用关系型数据的时候,有时候希望: - 管理员admin,可以查看到所有的数据 - 普通用户,某些敏感字段,比如信用卡 ...
- SQL Server ->> SQL Server 2016新特性之 -- Dynamic Data Masking
Dynamic Data Masking是为了防止敏感数据暴露给未经授权的用户,以一种最小开销和维护成本的形式.Dynamic Data Masking用于表的字段,相当于盖住字段数据的一部分.比如一 ...
- What technical details should a programmer of a web application consider before making the site public?
What things should a programmer implementing the technical details of a web application consider bef ...
- 年终巨献 史上最全 ——LINQ to SQL语句
LINQ to SQL语句(1)之Where 适用场景:实现过滤,查询等功能. 说明:与SQL命令中的Where作用相似,都是起到范围限定也就是过滤作用的,而判断条件就是它后面所接的子句.Where操 ...
随机推荐
- 【判环】Perpetuum Mobile
Perpetuum Mobile 题目描述 The year is 1902. Albert Einstein is working in the patent office in Bern. Many ...
- css之实现下拉框自上而下展开动画效果&&自下而上收起动画效果
HTML代码: <div className={CX('font-size-selector-sub-list', { show: shouldSubListShow === true, hid ...
- 【爬虫集合】抖音API分析
1. 分析接口 Charles注册码 Registered Name: https://zhile.io License Key: 48891cf209c6d32bf4 抖音API分析 抖音.猫眼网页 ...
- (九) spring 使用自定义限定符注解
案例一 定义接口 CD.java package interfacepackage; public interface CD { void play(); } 定义接口 player .java p ...
- ant Windows下环境变量配置 安装 编译
下载 官网:[http://ant.apache.org/] 其他版本:[http://archive.apache.org/dist/ant/binaries/] 点击这个进入下载页面 Window ...
- tasklist、taskkill命令使用
tasklist.taskkill命令使用 在Windows XP中新增了两个命令行工具“tasklist.taskkill”.通过“Ctrl+Alt+Del”组合键,打开“任务管理器”就可以查看到本 ...
- svm 简单明了的入门级使用教程(转载)
如何使用libsvm进行分类 这帖子就是初步教教刚接触libsvm(svm)的同学如何利用libsvm进行分类预测,关于参数寻优的问题在这里姑且不谈,另有帖子详述. 其实使用libsvm进行分类很 ...
- windows 下sublime text 3 配置python 环境详解
这我们的环境已经安装了python 3.7.1解释器和sublime text 3 编辑器 一.package control 安装 首先我们打开sublime text 3 ——>Tools— ...
- inotify+rsync文件实时同步
原文转自http://dl528888.blog.51cto.com/2382721/771533/ 之前做了“ssh信任与scp自动传输脚本”的技术文档,此方案是作为公司里备份的方法,但在实际的运行 ...
- webpack中使用WebpackDevServer实现请求转发
index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset=&quo ...