进行和提交数据更改Making and Submitting Data Changes

本节中的主题介绍如何做出更改并将更改传输至数据库,以及如何处理开放式并发冲突。The topics in this section describe how to make and transmit changes to the database and how to handle optimistic concurrency conflicts.

备注

您可以重写 LINQ to SQLLINQ to SQLInsertUpdate 数据库操作的 Delete 默认方法。You can override LINQ to SQLLINQ to SQL default methods for Insert, Update, and Delete database operations. 有关详细信息,请参阅自定义插入、更新和删除操作For more information, see Customizing Insert, Update, and Delete Operations.

使用 Visual Studio 的开发人员可以使用对象关系设计器来开发用于实现相同目的的存储过程。Developers using Visual Studio can use the Object Relational Designer to develop stored procedures for the same purpose.

本节内容In This Section

如何:在数据库中插入行 How to: Insert Rows Into the Database
介绍如何通过向对象模型添加对象将行插入到数据库中。Describes how to insert rows in the database by adding objects to the object model.

如何:更新数据库中的行 How to: Update Rows in the Database
介绍如何通过更新对象模型中的对象来更新数据库中的行。Describes how to update rows in the database by updating objects in the object model.

如何:删除数据库中的行 How to: Delete Rows From the Database
介绍如何通过删除对象模型中的对象来删除数据库中的行。Describes how to delete rows in the database by deleting objects in the object model.

如何:将更改提交到数据库 How to: Submit Changes to the Database
介绍如何将对象模型更改发送到数据库。Describes how to send object-model changes to the database.

如何:使用事务提交方括号数据 How to: Bracket Data Submissions by Using Transactions
介绍如何将操作包含在事务中。Describes how to include operations in a transaction.

如何:动态创建数据库 How to: Dynamically Create a Database
介绍如何动态生成数据库,以及此方法的一些典型方案。Describes how to generate databases dynamically, and typical scenarios for this approach.

如何:管理更改冲突 How to: Manage Change Conflicts
介绍用于处理开放式并发问题的技术。Describes techniques for addressing optimistic concurrency issues.