惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
P
Proofpoint News Feed
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
IT之家
IT之家
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
美团技术团队
D
Docker
博客园 - Franky
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报

博客园 - kenty06

LINQ 查询Select Dedecms57 分页 dede:pagelist 说明 window service服务安装错误 命名空间基础知识 - kenty06 - 博客园 C#简单类型转换说明 建立全文索引以及使用 Asp.net中防止用户多次登录的方法 VSS使用手册 开启全文索引 extJS初学小问题之js文件编码 - kenty06 - 博客园 希尔排序 VS2008加载包失败的解决方法 VS2005快捷键(转) 关于 odbc OdbcParameter参数问题 - kenty06 在 dotnet环境下使用 文件dsn - kenty06 关于枚举enum的tostring方法不能重写的一种替代方案 asp.net 2.0 学习点滴推荐(001) - kenty06 aspx页面事件顺序 - kenty06 - 博客园 C#中的default
LINQ之DataContext 数据上下文
kenty06 · 2011-05-05 · via 博客园 - kenty06

2011-05-05 13:51  kenty06  阅读(225)  评论(0)    收藏  举报

System.Data.Linq.Mapping; 定义实体与数据表的对应关系

DataContext 初始化,数据连接字符串,以及dbconnection

弱类型,强类型,

功能:执行对象与关系之间的转换操作

GetCommand 获取查询字符串

Log  日志-

获取数据

记录日志

创建和删除数据库

可以采用datareader数据读取方式

可以直接采用sql语句查询 ExecuteQuery<Customer>("select * from Customers where CustomerID like 'A%' ");

直接转换成

Customer ExecuteQuery("select * from Customers where CustomerID like 'A%' ");

ExecuteCommand("");