保存实体数据

通过实体框架或 WCF 数据服务创建、更新或删除连接到数据库的实体时,必须将更改明确保存回数据库。以下主题介绍如何在实体框架和 WCF 数据服务应用程序中保存对实体数据所做的更改。

主题

说明

How to: Add, Modify, and Delete Objects (Entity Framework)

演示如何将对实体数据的更改保存回数据库。

How to: Manage Data Concurrency in the Object Context (Entity Framework)

演示如何管理将哪些数据保存回数据库。

Walkthrough: Serialize Self-Tracking Entities (Entity Framework)

演示如何使用和保存自跟踪实体。

How to: Add, Modify, and Delete Entities (WCF Data Services)

演示如何通过数据服务保存回对实体数据的更改。

How to: Execute Asynchronous Data Service Queries (WCF Data Services)

演示如何通过数据服务异步保存更改。

请参见

其他资源

Saving Changes and Managing Concurrency (Entity Framework)

Updating the Data Service (WCF Data Services)