PropertyExtensions 類別

定義

警告

Use IReadOnlyProperty

IReadOnlyProperty 的擴充方法。

public static class PropertyExtensions
[System.Obsolete("Use IReadOnlyProperty")]
public static class PropertyExtensions
type PropertyExtensions = class
[<System.Obsolete("Use IReadOnlyProperty")>]
type PropertyExtensions = class
Public Module PropertyExtensions
繼承
PropertyExtensions
屬性

方法

CreateKeyEqualityComparer<TProperty>(IProperty)
已淘汰.

IEqualityComparer<T>為指定屬性類型的值建立 。

FindContainingPrimaryKey(IProperty)
已淘汰.

取得使用此屬性的主鍵 (包含此屬性的複合主鍵) 。

FindFirstPrincipal(IProperty)
已淘汰.

如果指定的屬性是外鍵的一部分,則尋找所指定屬性受限制的第一個主體屬性。

FindMapping(IProperty)
已淘汰.

CoreTypeMapping 回指定屬性的 。

FindPrincipals(IProperty)
已淘汰.

如果指定的屬性是外鍵的一部分,則尋找主體屬性清單,包括給定屬性所限制的指定屬性。

FindTypeMapping(IProperty)
已淘汰.

CoreTypeMapping 回指定屬性的 。

Format(IEnumerable<IPropertyBase>, Boolean)
已淘汰.

建立指定屬性的格式字串表示,例如在擲回索引鍵、索引等例外狀況時很有用。使用 屬性。

GetAfterSaveBehavior(IProperty)
已淘汰.

取得值,指出實體儲存至資料庫之後,是否可以修改這個屬性。

如果 Throw 為 ,則會在資料庫中存在實體之後,將新值指派給這個屬性時,擲回例外狀況。

如果 Ignore 為 ,則會忽略已存在於資料庫中之實體屬性值的任何修改。

GetBeforeSaveBehavior(IProperty)
已淘汰.

取得值,指出是否可以在實體儲存至資料庫之前修改這個屬性。

如果為 Throw ,則在狀態中 Added 時,如果值指派給這個屬性,則會擲回例外狀況。

如果 Ignore 為 ,則會在處於 狀態時 Added 忽略任何設定的值。

GetContainingForeignKeys(IProperty)
已淘汰.

取得使用此屬性的所有外鍵, (包括包含此屬性的複合外鍵) 。

GetContainingIndexes(IProperty)
已淘汰.

取得使用此屬性的所有索引 (包括包含此屬性的複合索引) 。

GetContainingKeys(IProperty)
已淘汰.

取得使用此屬性的所有主要或替代索引鍵, (包含此屬性的複合索引鍵) 。

GetContainingPrimaryKey(IProperty)
已淘汰.

取得使用此屬性的主鍵 (包含此屬性的複合主鍵) 。

GetKeyValueComparer(IProperty)
已淘汰.

ValueComparer取得要與這個屬性索引鍵搭配使用的 ,如果未設定,則 null 為 。

GetMaxLength(IProperty)
已淘汰.

取得這個屬性中允許的資料長度上限。 例如,如果 屬性是 String ,則這是字元數目上限。

GetPrecision(IProperty)
已淘汰.

取得這個屬性中允許的資料有效位數。 例如,如果 屬性是 Decimal ,則這是位數上限。

GetProviderClrType(IProperty)
已淘汰.

取得屬性值在傳送至資料庫提供者之前,將轉換成的類型。

GetScale(IProperty)
已淘汰.

取得這個屬性中允許的資料小數位數。 例如,如果 屬性是 Decimal ,則這是小數位數的最大數目。

GetStructuralValueComparer(IProperty)
已淘汰.

ValueComparer取得要用於此屬性之結構化複本的 ,如果沒有設定,則 null 為 。

GetTypeMapping(IProperty)
已淘汰.

CoreTypeMapping從完成的模型傳回指定屬性的 。

GetValueComparer(IProperty)
已淘汰.

ValueComparer取得這個屬性的 ,如果未設定,則 null 為 。

GetValueConverter(IProperty)
已淘汰.

取得這個屬性的自訂 ValueConverter 集合。

GetValueGeneratorFactory(IProperty)
已淘汰.

取得已設定為產生此屬性值的處理站,如果有的話。

IsForeignKey(IProperty)
已淘汰.

取得值,指出這個屬性是否做為外鍵 (或複合外鍵) 的一部分。

IsIndex(IProperty)
已淘汰.

取得值,指出這個屬性是否做為索引 (或複合索引) 的一部分。

IsKey(IProperty)
已淘汰.

取得值,指出這個屬性是否做為主鍵或替代索引鍵 (或複合主要或替代索引鍵的一部分) 。

IsPrimaryKey(IProperty)
已淘汰.

取得值,指出這個屬性是否做為主鍵 (或複合主鍵) 的一部分。

IsUnicode(IProperty)
已淘汰.

取得值,指出 屬性是否可以保存 Unicode 字元。

IsUniqueIndex(IProperty)
已淘汰.

取得值,指出這個屬性是否做為唯一索引 (或唯一複合索引) 的一部分。

ToDebugString(IProperty, MetadataDebugStringOptions, Int32)
已淘汰.

建立人類可讀取的指定中繼資料標記法。

警告:不要依賴傳回字串的格式。 它專為偵錯而設計,而且可能會在發行之間任意變更。

適用於