DbConfiguration.SetPluralizationService 方法
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
從衍生自 DbConfiguration 之類別的建構函式呼叫此方法以設定複數表示服務。
命名空間: System.Data.Entity
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId := "Pluralization")> _
<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId := "pluralization")> _
Protected Friend Sub SetPluralizationService ( _
pluralizationService As IPluralizationService _
)
'用途
Dim pluralizationService As IPluralizationService
Me.SetPluralizationService(pluralizationService)
[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pluralization")]
[SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "pluralization")]
protected internal void SetPluralizationService(
IPluralizationService pluralizationService
)
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = L"Pluralization")]
[SuppressMessageAttribute(L"Microsoft.Naming", L"CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = L"pluralization")]
protected public:
void SetPluralizationService(
IPluralizationService^ pluralizationService
)
[<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Pluralization")>]
[<SuppressMessageAttribute("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "pluralization")>]
member SetPluralizationService :
pluralizationService:IPluralizationService -> unit
function SetPluralizationService(
pluralizationService : IPluralizationService
)
參數
- pluralizationService
類型:System.Data.Entity.Infrastructure.Pluralization.IPluralizationService
要使用的複數表示服務。