IUniqueConstraint 介面
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
代表一個唯一的限制條件。
public interface IUniqueConstraint : Microsoft.EntityFrameworkCore.Infrastructure.IAnnotatable
type IUniqueConstraint = interface
interface IAnnotatable
interface IReadOnlyAnnotatable
type IUniqueConstraint = interface
interface IAnnotatable
Public Interface IUniqueConstraint
Implements IAnnotatable
- 衍生
- 實作
備註
更多資訊與範例請參閱 建模實體類型與關係 。
屬性
| 名稱 | Description |
|---|---|
| Columns |
取得參與唯一約束的欄位。 |
| Item[String] |
取得帶有名稱的註解值,若不存在則回 |
| MappedKeys |
取得映射的金鑰。 |
| Name |
取得唯一約束的名稱。 |
| Table |
在宣告唯一限制的表格上。 |
方法
擴充方法
| 名稱 | Description |
|---|---|
| AnnotationsToDebugString(IAnnotatable, Int32) |
取得物件上所有宣告註解的除錯字串。 |
| GetAnnotation(IAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetIsPrimaryKey(IUniqueConstraint) |
會得到一個值,表示該約束是否為主鍵。 |
| ToDebugString(IUniqueConstraint, MetadataDebugStringOptions, Int32) |
建立給定元資料的可讀表示法。 警告:請勿依賴回傳字串的格式。 它僅設計用於除錯,且可能在不同版本間任意變動。 |