10 2008 档案

摘要:The first step to insert a record into a database is to create a DataContext. That is the first step for every LINQ to SQL query. Second, an entity object is instantiated from an entity class. Third, that entity object is inserted into the appropriate table collection. And fourth, the SubmitChanges method is called on the DataContext. 阅读全文
posted @ 2008-10-23 16:21 ABeen 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 在 Linq 分页,当使用Skip(N)和Take(N)时(比如:ArchiveView2.Skip(5).Take(1))时, 提示错误:“NotSupportedException: 此提供程序只支持对返回实体或投影(包含所有标识列)的有序查询使用 Skip(),这种查询 为单表(非联接)查询,或者为 Distinct、Except、Intersect 或 Union (非 Concat)操作。”  网上关于这个问题的解决方法不多,大多都说是“主键设置”问题。我数据库中设置也设过了还是不行。  解决方法:    最好将数据库换个版本问题解决,不知道是不是真正的原因。    原来数据库是Microsoft SQL Server Desktop Engine,后来换成企业版了。Express也支持我测试过:)。 阅读全文
posted @ 2008-10-17 10:10 ABeen 阅读(758) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示