驗證概念模型中定義的資料

當您使用概念模型時,可以定義在符合網域的語言中何種資料為有效。您可以在模型中定義有效資料,也可以在實體或資料服務上執行的作業中加入驗證。

下列主題說明如何將驗證加入至 Entity Framework 和 WCF 資料服務應用程式。

主題

描述

How to: Add and Edit Referential Constraints (Entity Data Model Tools)

說明如何將關聯末端限制為有效實體。

How to: Edit Facet Values (Entity Data Model Tools)

說明如何建立屬性值的資料類型條件約束。

How to: Execute Business Logic During Scalar Property Changes (Entity Framework)

說明如何在屬性變更時驗證屬性。

How to: Execute Business Logic When Saving Changes (Entity Framework)

說明如何在儲存至資料庫之前驗證實體。

How to: Execute Business Logic During Association Changes

說明如何在關聯性變更時驗證實體。

How to: Intercept Data Service Messages (WCF Data Services)

說明如何將驗證加入至資料服務作業。

請參閱

其他資源

Defining Business Logic (Entity Framework)

Interceptors (WCF Data Services)