Google [站内搜索]

分类: Win编程预览模式: 普通 | 列表
使用Entity Framework保存记录时出错,提示:

引用内容 引用内容
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.


查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 15858

Entity Framework4.1调用存储过程示例

一、调用返回单个值的存储过程

1.存储过程

Create PROCEDURE [dbo].[Do]

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4667

Linq序列不包含任何元素解决方法

using System;
using System.Collections.Generic;
using System.Linq;

namespace ConsoleApplication1

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 9518
1.生成配置文件

打开Enterprise Library Configuration(EntLibConfig.exe),配置如下:

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 10633
在实体数据模型(EDM)加入导航属性后,序列化失败:

NorthwindContext context = new NorthwindContext();
var data = context.Categories.ToList();
//序列化

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 6174
一、添加SQL Server数据库ADO.NET实体数据模型

①.添加新项并选择"ADO.NET实体数据模型":

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 5356
在《Entity Framework 4.3简单使用示例》的基础上,希望能对数据进行缓存,写了个示例:

using System;
using System.Collections;
using System.Data.Entity;

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 5016

C#操作MongoDB简单示例

using System;
using System.Linq;
using MongoDB.Bson;
using MongoDB.Driver;
using MongoDB.Driver.Builders;

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4697

Entity Framework 4.3简单使用示例

第一步:在项目中引用程序集

·EntityFramework
·System.ComponentModel.DataAnnotations
·System.Data.Entity

查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4514
第一步:安装Visual Studio 2010扩展NuGet



查看更多...

分类:Win编程 | 固定链接 | 评论: 0 | 引用: 0 | 查看次数: 4168