CoreStrings 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
EF 例外中使用的字串資源等等。
這些字串公開供資料庫提供者與擴充功能使用。 應用程式程式碼需要這些字串是不尋常的。
[System.Runtime.CompilerServices.Nullable(0)]
public static class CoreStrings
public static class CoreStrings
[<System.Runtime.CompilerServices.Nullable(0)>]
type CoreStrings = class
type CoreStrings = class
Public Class CoreStrings
- 繼承
-
CoreStrings
- 屬性
屬性
| 名稱 | Description |
|---|---|
| AnonymousAndNamedFiltersCombined |
匿名與命名查詢過濾器無法同時套用。 指定一個匿名過濾器或一個或多個命名過濾器。 |
| CanConnectNotImplemented |
已淘汰.
目前的資料庫提供者尚未實作「CanConnect」方法。 |
| CannotConvertQueryableToEnumerableMethod |
無法將可查詢的方法轉換成可枚舉的方法。 這很可能是 Entity Framework 的問題,請在 https://aka.ms/efcorefeedback。 |
| ConcurrentMethodInvocation |
在前一個操作完成前,先在這個上下文實例上啟動第二個操作。 這通常是由使用相同 DbContext 實例並行處理的不同線程所造成。 關於如何避免 DbContext 執行緒問題的更多資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2097913。 |
| ContextDisposed |
無法存取已處理的上下文實例。 常見的錯誤原因是丟棄了從依賴注入解決的上下文實例,然後在應用程式其他地方嘗試使用同一個上下文實例。 如果你在上下文實例上呼叫「Dispose」,或用 using 語句包裝,可能會發生這種情況。 如果你使用依賴注入,應該讓依賴注入容器來處理上下文實例的處理。 |
| ConventionsInfiniteLoop |
慣例調用已達到遞迴極限。 這很可能是 Entity Framework 的問題,請在 https://go.microsoft.com/fwlink/?linkid=2142044. |
| DataBindingToLocalWithIListSource |
不支援直接綁定到 'DbSet.Local',因為它無法提供穩定的排序。 對於 WPF,綁定到 'DbSet.Local.ToObservableCollection'。 對於 WinForms,綁定到 'DbSet.Local.ToBindingList'。 對於 ASP.NET WebForms,請綁定至 'DbSet.ToList' 或使用 Model binding。 |
| DataBindingWithIListSource |
不支援直接綁定到儲存查詢。 相反地,請先在資料庫集合中輸入資料,例如在資料庫集合上呼叫「Load」,然後綁定到本地資料,以避免每次資料綁定控制項重複資料時都向資料庫發送查詢。 對於 WPF,綁定到 'DbSet.Local.ToObservableCollection'。 對於 WinForms,綁定到 'DbSet.Local.ToBindingList'。 對於 ASP.NET WebForms,請綁定至 'DbSet.ToList' 或使用 Model binding。 |
| DefaultMethodInvoked |
『EF』。預設<T>' 屬性只能在 Entity Framework 的「ExecuteUpdate」方法中使用。 |
| DeleteBehaviorAttributeNotOnNavigationProperty |
[DeleteBehavior] 屬性只能在導航屬性中指定,且不支援在構成外鍵的屬性上。 |
| DeleteBehaviorAttributeOnPrincipalProperty |
[DeleteBehavior] 屬性只能指定在關係的相依端。 |
| EFConstantInvoked |
『EF』。常數<T>' 方法只能在 Entity Framework 的 LINQ 查詢中使用。 |
| EFConstantNotSupported |
「EF。Constant()' 是你的服務提供者不支援的。 |
| EFConstantNotSupportedInPrecompiledQueries |
『EF』。使用預編譯查詢時不支援常數<T>' 方法。 |
| EFConstantWithNonEvaluatableArgument |
EF。常數<T> 方法只能搭配可於客戶端評估且不包含資料庫端實體的參數使用。 |
| EFParameterInvoked |
『EF』。參數<T>' 方法只能在 Entity Framework 的 LINQ 查詢中使用。 |
| EFParameterWithNonEvaluatableArgument |
EF。參數<T> 方法只能搭配可於客戶端評估且不包含資料庫端實體的參數使用。 |
| EmptyJsonString |
空字串不是有效的 JSON。 |
| EnumerableResetNotSupported |
此列舉器無法重置。 |
| ErrorInvalidQueryable |
不能在單一查詢執行中使用多個上下文實例。 確保查詢使用單一上下文實例。 |
| ErrorMaterializingValue |
讀取資料庫值時發生了異常。 如需詳細資訊,請參閱內部例外狀況。 |
| ExpressionParameterizationException |
在嘗試評估 LINQ 查詢參數表達式時拋出了一個例外。 如需詳細資訊,請參閱內部例外狀況。 要顯示更多資訊,請參考「DbContextOptionsBuilder.EnableSensitiveDataLogging」。 |
| HiLoBadBlockSize |
用於生成 Hi-Lo 值的區塊大小並非正數。 Hi-Lo 產生器通常有 SQL 序列作為後盾,這表示序列增量必須是正數。 |
| ImmediateConventionScopeCannotBeRunAgain |
已淘汰.
立即的大會範圍無法再次舉行。 |
| IncompatibleSourcesForSetOperation |
用於集合運算的來源不相容。 |
| InvalidDbContext |
先前的錯誤使資料庫上下文處於無效狀態。 應用程式在拋出 InvalidOperationException 後,不應繼續使用 DbContext 實例。 |
| InvalidMemberInitBinding |
未處理的操作:MemberInitExpression 綁定並非 MemberAssignment |
| InvalidPoolSize |
指定的 poolSize 必須大於 0。 |
| IQueryableProviderNotAsync |
來源 'IQueryable' 的提供者並未實作 'IAsyncQueryProvider'。 只有實作「IAsyncQueryProvider」的提供者才能用於實體框架的非同步操作。 |
| MemberListBindingNotSupported |
EF Core 不支援 MemberListBinding:「new Blog { Posts = { new Post(), new Post() } }」。 |
| MemberMemberBindingNotSupported |
EF Core 不支援 MemberBinding:「new Blog { Data = { Name = 「hello world」} }'。 |
| MissingAsyncSeeder |
執行了非同步儲存管理操作,且未提供非同步種子代理,但有同步種子代理。 用一個代理檔設定「UseAsyncSeeding」選項,與「UseSeeding」中提供的選項相當。 |
| MissingSeeder |
執行了同步儲存管理操作,且未提供同步種子代理,但有非同步種子代理。 用一個代理檔設定「UseSeeding」選項,與「UseAsyncSeeding」中提供的等效功能相同。 |
| ModelMutable |
當模型未被標記為唯讀時,不允許執行時中繼資料變更。 |
| ModelReadOnly |
當模型被標記為唯讀時,不允許更改元資料。 |
| NativeAotDesignTimeModel |
在使用 NativeAOT 發佈時,不支援設計時的 DbContext 操作。 |
| NativeAotNoCompiledModel |
在 NativeAOT 發佈時不支援模型建置。 使用已編譯的模型。 |
| NoEfServices |
實體框架服務尚未加入內部服務提供者。 要麼移除對「UseInternalServiceProvider」的呼叫,讓 Entity Framework 自行管理內部服務,要麼使用資料庫提供者的方法將所需服務加入服務提供者(例如 'AddEntityFrameworkSqlServer')。 |
| NoElements |
序列不包含元素。 |
| NoInterceptionResult |
當「InterceptionResult.HasResult」為假時,會呼叫「InterceptionResult.Result」。 |
| NoProviderConfigured |
此資料庫上下文尚未設定任何資料庫提供者。 提供者可以透過覆寫「DbContext.OnConfiguring」方法或在應用程式服務提供者上使用「AddDbContext」來設定。 如果使用 'AddDbContext',也請確保你的 DbContext 類型在其建構子中接受 DbContextOptions<TContext> 物件,並將其傳給 DbContext 的基礎建構子。 |
| NoSetPropertyInvocation |
「ExecuteUpdate」呼叫必須指定至少一個「SetProperty」呼叫,以指示要更新的屬性。 |
| NotQueryingEnumerable |
給定的「IQueryable」不支援查詢字串的產生。 |
| ObjectRemovedFromModel |
該物件已從模型中移除。 |
| OwnedEntitiesCannotBeTrackedWithoutTheirOwner |
追蹤查詢嘗試投射一個沒有對應擁有者的人,但被擁有的實體無法在沒有擁有者的情況下被追蹤。 要麼在結果中包含擁有者實體,要麼讓查詢使用「AsNoTracking」非追蹤。 |
| PoolingOptionsModified |
當啟用 DbContext 池時,無法使用 'OnConfiguring' 來修改 DbContextOptions。 |
| PrecompiledQueryNotSupported |
目前的提供者不支援預先編譯的查詢。 |
| PropertyMethodInvoked |
EF。屬性<T> 方法只能在實體框架的 LINQ 查詢中使用。 |
| QueryContextAlreadyInitializedStateManager |
「InitializeStateManager」方法在目前查詢上下文中已被多次呼叫。 此方法設計為在查詢列舉開始前僅呼叫一次。 |
| QueryNotPrecompiled |
Query 沒有預先編譯,動態程式碼也沒有在 NativeAOT 中被支援。 |
| QuerySelectContainsGrouping |
不支援包含分組參數但未包含組合的「Select」的翻譯。 |
| QueryUnableToTranslateStringEqualsWithStringComparison |
「字串」的翻譯。不支援帶有「StringComparison」參數的 Equals 過載。 如需相關資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=2129535 。 |
| RecursiveOnConfiguring |
在設定 context 實例時,嘗試使用它。 DbContext 實例無法在「OnConfiguring」中使用,因為此時它還在設定中。 如果在前一個操作完成之前,先對該上下文實例啟動第二個操作,就可能發生這種情況。 任何實例成員都不保證具有執行緒安全性。 |
| RecursiveOnModelCreating |
在模型製作過程中曾嘗試使用該模型。 DbContext 實例不能在 'OnModelCreating' 中以任何方式使用正在建立的模型。 |
| RelationshipCannotBeInverted |
一旦指定了外鍵或主鍵屬性,關係的主端與依賴端就無法更改。 移除衝突的配置。 |
| ResetNotSupported |
「可觀察集合<T>。不支援「清除」,因為它使用「INotifyCollectionChanged」的「Reset」操作,無法提供被移除的項目。 要麼使用多次呼叫來「移除」,要嘛使用支援「清除」的通知集合,例如「Microsoft。EntityFrameworkCore.ChangeTracking.ObservableHashSet<T>'. |
| RuntimeModelMissingData |
請求的設定未儲存在已閱讀最佳化的模型中,請使用 'DbContext.GetService<IDesignTimeModel>().模特兒。 |
| RuntimeParameterMissingParameter |
在註冊執行時參數時,lambda 運算式必須只有一個參數,且必須與「QueryCompilationContext.QueryContextParameter」的表達式相同。 |
| SavepointsNotSupported |
儲存點不被所使用的資料庫提供者支援。 |
| SensitiveDataDisabled |
要顯示更多資訊,請參考「DbContextOptionsBuilder.EnableSensitiveDataLogging」。 |
| SequenceContainsMoreThanOneElement |
序列包含多個元素。 |
| SequenceContainsNoElements |
序列不包含元素。 |
| SetOperationWithDifferentIncludesInOperands |
無法轉換集合操作,因為兩個運算元的「包含」操作不同。 考慮雙方都套用相同的「包含」字樣。 |
| SetPropertyMethodInvoked |
SetProperty<TProperty> 方法只能在「ExecuteUpdate」方法中使用。 |
| TransactionsNotSupported |
目前的服務提供者不支援 System.Transaction。 |
方法
| 名稱 | Description |
|---|---|
| AbstractLeafEntityType(Object) |
實體類型 '{entityType}' 無法實例化,因為其對應的 CLR 類型是抽象的,且模型中沒有對應於具體 CLR 類型的衍生實體類型。 在模型中新增一個具體衍生的實體類型,或將實體類型改為使用具體的 CLR 類型。 |
| AddingProxyTypeAsEntityType(Object) |
類型 '{typeName}' 無法加入模型,因為它是動態產生的代理類型。 改用非代理型態。 |
| AmbiguousDependentEntity(Object, Object) |
實體類型 '{entityType}' 是一種共享型實體類型,目前所提供的實體會從多個所有者實體中被引用。 若要存取特定參考的條目,請在擁有者條目上呼叫 '{targetEntryCall}'。 |
| AmbiguousEndRequiredDependent(Object, Object) |
實體類型為「{entityType}」的外鍵 {foreignKeyProperties} 無法設定為必須的依賴項,因為無法確定依賴端。 要識別關係的依賴端,請在「OnModelCreating」中設定外鍵屬性。 如需詳細資訊,請參閱 https://go.microsoft.com/fwlink/?LinkId=724062。 |
| AmbiguousEndRequiredDependentNavigation(Object, Object, Object) |
導航 '{entityType}.{navigation}' 無法依需求配置,因為無法確定底層外鍵 {foreignKeyProperties} 的依賴端。 要識別關係的依賴端,請在「OnModelCreating」中設定外鍵屬性。 如需詳細資訊,請參閱 https://go.microsoft.com/fwlink/?LinkId=724062。 |
| AmbiguousEndRequiredInverted(Object, Object, Object) |
實體類型 '{entityType}' 的外鍵 {foreignKeyProperties} 無法反轉為實體類型 '{principalEntityType}',因為它是在依賴方設定前就已設定為所需。 在依需求設定外鍵之前,先設定外鍵屬性或主鍵。 如需詳細資訊,請參閱 https://go.microsoft.com/fwlink/?LinkId=724062。 |
| AmbiguousForeignKeyPropertyCandidates(Object, Object, Object, Object, Object) |
'{firstDependentToPrincipalNavigationSpecification}' 與 '{firstPrincipalToDependentNavigationSpecification}' 之間的關係,以及 '{secondDependentToPrincipalNavigationSpecification}' 與 '{secondPrincipalToDependentNavigationSpecification}' 之間的關係,都可以使用 {foreignKeyProperties} 作為外鍵。 為了解決這個問題,請在「OnModelCreating」中明確配置至少一個關係的外鍵屬性。 |
| AmbiguousOneToOneRelationship(Object, Object) |
在「{dependentToPrincipalNavigationSpecification}」與「{principalToDependentNavigationSpecification}' 之間的一對一關係中,無法確定依賴側。 要識別關係的依賴側,請設定外金鑰屬性。 如果這些導航不應該屬於同一關係,請透過「OnModelCreating」中不同的方法鏈獨立配置它們。 如需詳細資訊,請參閱 https://go.microsoft.com/fwlink/?LinkId=724062。 |
| AmbiguousOwnedNavigation(Object, Object) |
無法確定「{entityTypeNavigationSpecification}' 與 '{otherEntityType}' 之間關係的擁有者,因為這兩種類型都被標記為擁有。 你可以手動設定擁有權,或是用 [NotMapped] 屬性忽略對應的導航,或是在 “OnModelCreating” 裡使用 'EntityTypeBuilder.Ignore' 來操作。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| AmbiguousServiceProperty(Object, Object, Object) |
服務屬性 '{property}' 的 '{serviceType}' 無法加入實體類型 '{entityType}'' 中,因為還有另一個同類型的屬性。 請使用 [NotMapped] 屬性或在 “OnModelCreating” 中使用 'EntityTypeBuilder.Ignore' 忽略其中一個屬性。 |
| AmbiguousSharedTypeEntityTypeName(Object) |
共用類型實體類型 '{entityType}' 無法加入模型,因為它的名稱與 CLR 類型名稱相同。 這通常表示錯誤,請將其加入為非共享實體類型,或選擇其他名稱。 |
| AnnotationNotFound(Object, Object) |
未找到註解「{annotation}」。 請確保註解已被加入物件 {annotatable}。 |
| AnnotationNotFound(Object) |
未找到註解「{annotation}」。 請確保註解已被添加。 |
| ArgumentNotConstant(Object, Object) |
傳遞給 '{methodName}' 的 '{parameter}' 值必須是常數。 |
| ArgumentPropertyNull(Object, Object) |
參數 '{argument}' 的性質 '{property}' 不可能是「null」。 |
| AttributeNotOnEntityTypeProperty(Object, Object, Object) |
[{attribute}] 屬性只能在實體類型屬性上指定。 從 '{type} 中移除屬性。{propertyName}'。 |
| AutoIncludeNavigationCycle(Object) |
自動包含導航時偵測到循環:{cycleNavigations}。 要解決這個問題,要麼不要在循環中至少設定一個導覽為自動包含在「OnModelCreating」中,要嘛在查詢時呼叫「IgnoreAutoInclude」方法。 |
| AutoLoadedConcurrencyTokenProperty(Object, Object) |
屬性 '{type}' 屬於並行標記,無法設定為非自動載入。 並發代幣必須始終載入。 |
| AutoLoadedConstructorProperty(Object, Object) |
類型 '{type}' 上的屬性 '{property}' 用於建構子綁定,且無法設定為非自動載入。 建構子綁定的屬性必須始終載入。 |
| AutoLoadedDiscriminatorProperty(Object, Object) |
類型 '{type}' 上的屬性 '{property}' 是判別子,無法設定為非自動載入。 判別子屬性必須始終被載入。 |
| AutoLoadedForeignKeyProperty(Object, Object) |
類型 '{type}' 上的屬性 '{property}' 屬於外鍵,無法設定為非自動載入。 外鍵屬性必須始終載入。 |
| AutoLoadedKeyProperty(Object, Object) |
類型 '{type}' 上的屬性 '{property}' 是鍵的一部分,無法設定為非自動載入。 關鍵屬性必須始終載入。 |
| BackingFieldOnIndexer(Object, Object, Object) |
索引工具屬性 '{entityType}} 無法設定 '{field}' 的後盾欄位。{property}'。 確保索引器屬性不指定任何後台欄位。 |
| BadBackingFieldType(Object, Object, Object, Object, Object) |
指定的欄位 '{fieldType}' 類型不能用於屬性 '{entityType}'。{property}' 型別為 '{propertyType}''。 只能使用與屬性型別相容的類型後盾欄位。 |
| BadDependencyRegistration(Object) |
服務相依類型 '{dependenciesType}' 在服務集合中被錯誤註冊。 服務相依類型只能由實體框架或資料庫提供者註冊。 |
| BadEnumValue(Object, Object) |
值 '{enumValue}' 無法解析為 enum '{enumType}'' 的值。 |
| BadFilterDerivedType(Object, Object, Object) |
過濾器表達式 '{filter}' 無法指定於實體類型 '{entityType}'。 過濾器只能套用在根實體類型 '{rootType}' 上。 |
| BadFilterDerivedType(Object, Object) |
過濾器表達式 '{filter}' 無法指定於實體類型 '{entityType}'。 過濾器只能套用在階層結構中的根實體類型。 |
| BadFilterExpression(Object, Object, Object) |
為實體類型 '{entityType}' 指定的過濾表達式 '{filter}' 無效。 表達式必須接受一個類型為 '{clrType}' 的單一參數,並回傳 'bool'。 |
| BadFilterOwnedType(Object, Object) |
過濾器表達式 '{filter}' 無法指定於擁有實體類型 '{entityType}' 。 過濾器只能套用於非擁有實體類型。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| BadJsonValueReaderWriterType(Object) |
型別 '{givenType}' 無法用作「JsonValueReaderWriter」,因為它不繼承自通用的「JsonValueReaderWriter<TValue>」。 務必從「JsonValueReaderWriter<TValue>」繼承 JSON 讀寫器。 |
| BadListType(Object, Object) |
型別 '{givenType}' 不能用作原始集合,因為它不是陣列,也未實作 '{listType}''。 原始型態的集合必須是陣列或有序串列。 |
| BadValueComparerType(Object, Object) |
型別 '{givenType}' 無法用作值比較器,因為它不繼承自 '{expectedType}''。 務必繼承 '{expectedType}' 的值比較器。 |
| BadValueConverterType(Object, Object) |
型別 '{givenType}' 無法用作值轉換器,因為它不繼承 '{expectedType}'' 的。 務必繼承 '{expectedType}' 的值轉換器。 |
| BadValueGeneratorType(Object, Object) |
型別 '{givenType}' 不能用作值產生器,因為它不繼承自 '{expectedType}''。 務必繼承 '{expectedType}'' 的值產生器。 |
| CannotBeNullable(Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 無法被標記為可空/可選,因為該屬性的型別是 '{propertyType}',而這不是可空的型別。 任何屬性都可以標記為非空(non-nullable/required),但只有可空型的屬性可以標記為空(nullable/optional)。 |
| CannotBeNullableElement(Object, Object, Object) |
屬性 '{entityType} 的元素類型。{property}' 無法標記為可空/可選,因為該元素的型別是 '{elementType}',而這不是可空的型別。 任何元素類型都可以標記為非 nullable/required,但只有可 null 類型的元素才能被標記為 nullable/optional。 |
| CannotBeNullablePK(Object, Object) |
性質 '{1_entityType}。{0_property}' 不能被標記為可空或可選,因為該屬性是鍵的一部分。 任何屬性都可以標記為非空/必需,但只有可空型且非鍵一部分的屬性才可標記為空或可選。 |
| CannotConvertEnumValue(Object, Object) |
無法將資料庫中的字串值 '{value}' 轉換成映射的 '{enumType}' 枚舉中的任何值。 |
| CannotCreateJsonValueReaderWriter(Object) |
無法建立 reader/writer 類型的 '{readerWriterType}' 實例。 確保該型別可實例化且擁有無參數的公共建構子,或有公開的靜態「實例」欄位回傳單例實例以供使用。 |
| CannotCreateValueComparer(Object, Object) |
無法建立值比較型別類型 '{generatorType}' 的實例。 確保型別可實例化且有無參數建構子,或使用接受代理的 '{method}' 的超載。 |
| CannotCreateValueConverter(Object, Object) |
無法建立價值轉換器類型 '{generatorType}' 的實例。 確保型別可實例化且有無參數建構子,或使用接受代理的 '{method}' 的超載。 |
| CannotCreateValueGenerator(Object, Object) |
無法建立值產生器類型為 '{generatorType}' 的實例。 確保型別可實例化且有無參數建構子,或使用接受代理的 '{method}' 的超載。 |
| CannotCreateValueGenerator(Object) |
無法建立值產生器類型為 '{generatorType}' 的實例。 確保該型別可實例化且擁有無參數建構子,或使用接受代理的 'HasValueGenerator' 的超載功能。 |
| CannotLoadDetached(Object, Object) |
導航「{1_entityType}。{0_navigation}' 無法載入,因為該實體並未被追蹤。 導航只能載入被追蹤實體。 |
| CannotLoadDetachedShadow(Object, Object) |
導航「{1_entityType}。{0_navigation}' 無法載入,因為一個或多個金鑰或外鍵屬性是陰影屬性,且該實體未被追蹤。 使用陰影值的關係只能載入於追蹤實體。 |
| CannotMarkNonShared(Object) |
類型 '{type}' 無法標記為非共享類型,因為模型中存在具有此 CLR 類型的共享型實體類型。 |
| CannotMarkShared(Object) |
類型「{type}」無法標記為共享類型,因為模型中已有具有相同 CLR 類型的實體類型。 |
| CannotMaterializeAbstractType(Object) |
無法建立實體類型為「{entityType}」的實例,因為它是抽象的。 考慮讓它非抽象化,或至少映射一個導出型態。 |
| CanOnlyConfigureExistingNavigations(Object, Object) |
導航 '{1_entityType}.{0_navigationName}' 未被找到。 在設定實體類型前,請先使用 'HasOne', 'HasMany' 或 'OwnsOne'/'OwnsMany' 方法將導覽加入該實體類型。 |
| ChangeTrackingInterfaceMissing(Object, Object, Object) |
實體類型 '{entityType}' 設定為使用 '{changeTrackingStrategy}' 變更追蹤策略,但未實作所需的 '{notificationInterface}' 介面。 在「{entityType}」上實作「{notificationInterface}」,或使用其他變更追蹤策略。 |
| CircularDependency(Object) |
無法儲存變更,因為在待儲存的資料中偵測到循環依賴:「{cycle}」。 |
| CircularInheritance(Object, Object) |
實體類型 '{entityType}' 無法繼承自 '{baseEntityType}',因為 '{baseEntityType}' 是 '{entityType}' 的後代。 檢視你的模型配置。 |
| ClashingMismatchedSharedType(Object, Object) |
共享型態實體類型 '{entityType}' 無法新增,因為模型中已有同名但 CLR 類型不同的實體類型 '{otherClrType}''。 確保所有實體類型名稱都是唯一的。 |
| ClashingNamedOwnedType(Object, Object, Object) |
模型中已經新增了一個名為「{ownedTypeName}」的實體類型。 設定所有權時請使用不同的名稱 '{ownerEntityType}。{navigation}' 在「OnModelCreating」中。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| ClashingNonOwnedDerivedEntityType(Object, Object) |
實體類型 '{entityType}' 無法被標記為擁有,因為衍生實體類型 '{derivedType}' 已被設定為非擁有。 要麼不要將 '{derivedType}' 設定為非擁有,要嘛在 'OnModelCreating' 中呼叫 'HasBaseType(null)'。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| ClashingNonOwnedEntityType(Object) |
實體類型 '{entityType}' 無法被設定為擁有,因為它已被設定為非擁有。 如果該實體類型應該被擁有,請移除 'Entity<{entityType}>()' 呼叫(如果可能),或者以呼叫「Ignore」的方式移除該實體類型。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| ClashingNonSharedType(Object, Object) |
CLR 類型為 '{type}' 的共享實體類型 '{entityType}' 無法加入模型,因為已有非共享實體類型且 CLR 類型相同。 |
| ClashingNonWeakEntityType(Object) |
已淘汰.
具有定義導覽的實體類型「{entityType}」無法加入模型,因為已有同名實體類型存在。 |
| ClashingOwnedDerivedEntityType(Object, Object) |
實體類型 '{entityType}' 無法標記為非擁有,因為衍生實體類型 '{derivedType}' 已被設定為擁有。 要麼不要將 '{derivedType}' 設定為擁有,要嘛在 'OnModelCreating' 裡呼叫 'HasBaseType(null)'。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| ClashingOwnedEntityType(Object) |
實體類型 '{entityType}' 無法被設定為非擁有,因為它已經被設定為擁有。 在擁有者實體類型建構器中,使用「OwnsOne」或「OwnsMany」中的巢狀建構器來進一步配置此類型。 如果實體類型不應該被擁有,且你無法移除「OwnsOne」或「OwnsMany」呼叫,你可以透過呼叫「忽略」來移除該實體類型。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| ClashingSharedType(Object) |
實體類型 '{entityType}' 無法加入模型,因為其 CLR 類型已被設定為共享類型。 |
| ClashingWeakEntityType(Object) |
已淘汰.
實體類型 '{entityType}' 無法加入模型,因為已有同名具有定義導覽的實體類型存在。 |
| ClientProjectionCapturingConstantInMethodArgument(Object, Object) |
客戶端投影包含一個常數表達式 '{constantType}' 的參考,該表達式作為參數傳遞給方法「{methodName}」。 這可能導致記憶體洩漏;考慮將此常數指派給一個本地變數,並在查詢中使用該變數。 如需詳細資訊和範例,請參閱 https://go.microsoft.com/fwlink/?linkid=2103067。 |
| ClientProjectionCapturingConstantInMethodInstance(Object, Object) |
客戶端投影透過實例方法「{methodName}' 引用常數表達式 '{constantType}'。 這可能導致記憶體洩漏;考慮將方法設為靜態,避免在實例中捕捉常數。 如需詳細資訊和範例,請參閱 https://go.microsoft.com/fwlink/?linkid=2103067。 |
| ClientProjectionCapturingConstantInTree(Object) |
客戶端投影包含對常數表達式 '{constantType}' 的參考。 這可能導致記憶體洩漏;考慮將此常數指派給一個本地變數,並在查詢中使用該變數。 如需詳細資訊和範例,請參閱 https://go.microsoft.com/fwlink/?linkid=2103067。 |
| ClrPropertyOnShadowEntity(Object, Object) |
已淘汰.
屬性 '{property}' 無法存在於類型 '{entityType}'' 上,因為該類型被標記為影子狀態,而屬性則不是。 影子狀態類型只能包含影子狀態屬性。 |
| CollectionIsReference(Object, Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 是透過 '{collectionMethod}'' 存取,但在模型中被定義為非集合、參考導覽。 請使用 '{referenceMethod}' 來存取參考導覽。 |
| ComparerPropertyMismatch(Object, Object, Object, Object) |
類型 '{type}' 的比較器無法用於 '{entityType}。{propertyName}',因為它的型別是 '{propertyType}''。 |
| ComparerPropertyMismatchElement(Object, Object, Object, Object) |
元素類型 '{type}' 的比較器無法用於 '{entityType}。{propertyName}',因為它的元素類型是 '{elementType}'。 |
| CompiledModelDuplicateAttribute(Object, Object) |
在組合語言 '{assemblyName}' 中發現了多個對應上下文類型 '{contextType}' 的 DbContextModelAttribute |
| CompiledModelIncompatibleTypeMapping(Object) |
所使用的型別映射與編譯後的模型不相容。 映射類型必須有「公開靜態只讀 {typeMapping} {typeMapping}。Default' 屬性。 |
| CompiledModelMissingInstance(Object) |
'{modelType}' 必須宣告一個名為「Instance」的靜態屬性,該屬性會回傳「IModel」。 |
| CompiledQueryDifferentModel(Object) |
編譯後的查詢「{queryExpression}」是用與編譯時不同的模型執行的。 編譯後的查詢只能用於單一模型。 |
| ComplexCollectionEntryDeletedEntity(Object, Object, Object) |
集合 '{declaringType}} 的複數項目 '{ordinal}'。{collection}' 無法存取,因為包含的條目處於刪除狀態。 |
| ComplexCollectionEntryInvalidStateChange(Object) |
無法直接將 '{property}}' 複雜集合中的元素狀態從已刪除改為新增,或反之亦然。 先標記為未改變。 |
| ComplexCollectionEntryOrdinalInvalid(Object, Object, Object, Object) |
複數元素序數 '{ordinal}' 對於集合 '{declaringType} 無效。{collection}',因為它不在長度為 '{count}' 的集合之外。 |
| ComplexCollectionEntryOrdinalReadOnly(Object, Object) |
'{collectionDeclaringType} 的一個項目的序數。{collection}' 複雜集合除非被分離或刪除,否則無法更改。 |
| ComplexCollectionEntryOriginalNull(Object, Object) |
複雜型態集合 '{declaringType} 無法存取原始條目。{collection}' 因為原本是 'null'。 |
| ComplexCollectionEntryOriginalOrdinalInvalid(Object, Object, Object, Object) |
複數條目原始序數 '{ordinal}' 對於屬性 '{declaringType} 無效。{collection}',因為它不在長度為 '{count}' 的集合之外。 |
| ComplexCollectionEntryOriginalOrdinalReadOnly(Object, Object) |
'{collectionDeclaringType} 條目的原始序數。{collection}' 複雜集合無法更改,除非被分離或新增。 |
| ComplexCollectionIsReference(Object, Object, Object, Object) |
屬性為 '{entityType}。{property}' 是透過 '{collectionMethod}' 存取,但在模型中被定義為非集合複雜屬性。 使用 '{referenceMethod}' 來存取非集合的複雜屬性。 |
| ComplexCollectionMoveInvalidOrdinals(Object, Object, Object) |
移動操作所指定的序數無效:從「{fromOrdinal}」到 '{toOrdinal}'。 該集合僅有「{count}」條目。 |
| ComplexCollectionNotInitialized(Object, Object) |
複數型態集合 '{entityType}.{collection}' 必須先初始化為非空值,才能存取這些元素。 |
| ComplexCollectionNullElementSetter(Object, Object, Object, Object, Object) |
屬性 '{complexType} 的值。{property}' 無法被設定,因為它位於複雜型別集合元素 '{collectionDeclaringType} 上。{收藏}[{ordinal}]' 包含一個「空」值。 |
| ComplexCollectionOrdinalOutOfRange(Object, Object, Object, Object) |
序數 {ordinal} 對於複數型態集合 '{entityType} 來說不在範圍之外。{collection}' 具有 {count} 元素。 |
| ComplexCollectionOriginalEntryAddedEntity(Object, Object, Object) |
集合 '{declaringType}} 在原始序數處的複數條目。{collection}' 無法存取,因為包含的條目已處於新增狀態。 |
| ComplexCollectionValueNotDictionaryList(Object, Object) |
複雜集合屬性 '{property}' 的值必須是字典清單,但它是 '{typeName}''。 |
| ComplexCollectionWrongClrType(Object, Object, Object, Object) |
集合複合屬性 '{property}' 無法加入 '{type}' 型,因為其 CLR 類型 '{clrType}' 未實作 'IEnumerable<{targetType}>''。 集合複合體屬性必須實作該複數類型的 IEnumable<> 。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-complex-types 。 |
| ComplexPropertyChainIntermediateNotFound(Object, Object) |
中間複數性質 '{member}' 未出現在類型 '{type}' 上。 使用點狀屬性名稱時,所有中間段必須指向複雜屬性。 |
| ComplexPropertyChainInvalidMember(Object, Object) |
類型 '{type}' 的成員 '{member}' 被設定為非複雜屬性,無法作為鏈式屬性存取的中間節點。 如果是這個目的,先把它設定成複雜屬性。 |
| ComplexPropertyChainInvalidSegment(Object) |
點狀屬性名稱 '{dottedName}' 包含一個空段。 點狀屬性名稱必須由非空區段組成,中間以 '.' 分隔。 |
| ComplexPropertyChainOnCollection(Object, Object) |
類型 '{type}' 的成員 '{member}' 是一個複雜的集合屬性,無法在鏈式屬性存取中被遍歷。 使用「ComplexCollection」方法設定複雜集合元素類型的屬性。 |
| ComplexPropertyCollection(Object, Object) |
加入集合複數性質 '{type}。{property}' 不被支援。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31237 。 |
| ComplexPropertyIndexer(Object, Object) |
加入複數性質 '{type}。{property}' 作為索引工具屬性不被支援。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31244 。 |
| ComplexPropertyNotCollection(Object, Object) |
複數性質 '{type}.{property}' 不是集合。 此處僅能使用複集合性質。 |
| ComplexPropertyNotFound(Object, Object) |
複數性質 '{type}.{property}' 無法找到。 確保該屬性存在且已納入模型中,作為一個複雜屬性。 |
| ComplexPropertyOptional(Object, Object) |
配置複雜屬性 '{type}.{property}' 作為可選選項不支援,請呼叫 'IsRequired()'。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31376 。 |
| ComplexPropertyShadow(Object, Object) |
配置複雜屬性 '{type}.{property}' 在影子狀態下不被支援。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31243 。 |
| ComplexPropertyValueNotDictionary(Object, Object) |
複雜屬性 '{property}' 的值必須是「字典<字串,物件>」,但它是「{typeName}'。 |
| ComplexPropertyValueNotList(Object, Object, Object) |
複雜集合屬性 '{property}' 的值必須是 '{clrType}'',但它是 '{typeName}''。 |
| ComplexPropertyWrongClrType(Object, Object, Object, Object) |
複雜屬性 '{property}' 無法加入 '{type}' 型,因為其 CLR 型別 '{clrType}' 與預期的 CLR 型別 '{targetType}'' 不符。 |
| ComplexReferenceIsCollection(Object, Object, Object, Object) |
屬性為 '{entityType}。{property}' 是透過 '{referenceMethod}'' 方法存取,但在模型中定義為集合複合性質。 使用 '{collectionMethod}' 方法來存取 collection complex 屬性。 |
| ComplexTypeNotificationChangeTracking(Object, Object) |
複雜型態 '{complexType}' 使用變更追蹤策略 '{changeTrackingStrategy}'',但不支援帶有通知變更追蹤的複雜型態。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/36175 。 |
| ComplexTypeShadowProperty(Object, Object) |
陰影屬性 '{complexType}.{property}' 無法在複雜型態 '{complexType}'' 上設定。 複雜型別不支援陰影屬性。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/35613 。 |
| ComplexTypesNotSupported(Object) |
'{service}' 目前不支援複雜型別。 |
| ComplexValueTypeCollection(Object, Object) |
複型集合 '{type}.{property}' 無法被設定,因為不支援複雜的值類型集合。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31411 。 |
| ComplexValueTypeShadowProperty(Object, Object) |
影子屬性 '{type}.{property}' 無法在複雜型態的值型別 '{type}' 上進行配置。 陰影屬性不支援值型態的複雜型態。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/35337 。 |
| CompositeFkOnProperty(Object, Object) |
有多個屬性以 [ForeignKey] 屬性指向導航 '{1_entityType}。{0_navigation}'。 若要使用資料註解定義複合外鍵,請在導覽中使用 [ForeignKey] 屬性。 |
| CompositePKWithDataAnnotation(Object) |
實體類型 '{entityType}' 具有多個屬性,且 [Key] 屬性。 複合主鍵可以透過在實體類型類別中放置 [PrimaryKey] 屬性,或在 'OnModelCreating' 中使用「HasKey」來設定。 |
| ConflictingBackingFields(Object, Object, Object, Object) |
性質 '{1_entityType}.{0_property}' 依慣例同時匹配 '{field1}' 與 '{field2}'。 在「OnModelCreating」中明確指定要搭配 'HasField' 的背景欄位。 |
| ConflictingFieldProperty(Object, Object, Object, Object, Object) |
成員 '{type}.{property}' 不能使用欄位 '{field}',因為它已被 '{conflictingType}} 使用。{conflictingProperty}'。 |
| ConflictingForeignKeyAttributes(Object, Object, Object) |
有多個 [ForeignKey] 屬性指向同一組屬性集合,該屬性為實體類型為 '{entityType}'',並針對主要實體類型為「{principalEntityType}'。 |
| ConflictingForeignKeyAttributes(Object, Object) |
有多個 ForeignKeyAttributes 指向同一組屬性——實體類型 '{entityType}' 上的 '{propertyList}'。 |
| ConflictingKeylessAndPrimaryKeyAttributes(Object) |
實體類型 '{entity}' 同時擁有 [Keyless] 與 [PrimaryKey] 屬性;必須移除其中一人。 |
| ConflictingNamedIndex(Object, Object, Object) |
名為「{indexName}」的索引,實體類型為「{entityType}」,無法在屬性 {propertyList} 上設定,因為同名的索引已在不同屬性或不同的複雜集合索引中定義。 請使用不同名稱來稱呼這個索引。 |
| ConflictingPropertyOrNavigation(Object, Object, Object) |
屬性或導覽 '{member}' 無法加入 '{type}'' 類型,因為 '{conflictingType}'' 類型中已有同名屬性或導覽存在。 |
| ConflictingPropertyOrNavigationOnBaseType(Object, Object, Object, Object) |
成員 '{member}' 無法加入 '{type}' 類型,因為 '{conflictingType}' 類型中已有同名的 {conflictingMemberKind}。 先移除現有的 {conflictingMemberKind}。 |
| ConflictingPropertyOrNavigationWithKind(Object, Object, Object) |
成員 '{member}' 無法加入 '{type}' 類型,因為已有同名的 {conflictingMemberKind} 存在。 先移除現有的 {conflictingMemberKind}。 |
| ConflictingRelationshipConversions(Object, Object, Object, Object) |
屬性為 '{entityType}。{property}' 參與多個有衝突轉換的關係鏈:'{valueConversion}' 和 '{conflictingValueConversion}''。 |
| ConflictingRelationshipNavigation(Object, Object, Object, Object, Object, Object, Object, Object) |
無法在 '{newPrincipalEntityType} 之間建立關聯。{newPrincipalNavigation}' 和 '{newDependentEntityType}.{newDependentNavigation}',因為 '{existingPrincipalEntityType} 之間已經存在關係。{existingPrincipalNavigation}' 和 '{existingDependentEntityType}.{existingDependentNavigation}'。 導航屬性只能參與單一關係。 |
| ConflictingRelationshipNavigation(Object, Object, Object, Object) |
無法建立「{newPrincipalNavigationSpecification}' 與「{newDependentNavigationSpecification}' 之間的關係,因為 '{existingPrincipalNavigationSpecification}' 與 '{existingDependentNavigationSpecification}' 之間已有關聯。 導航只能參與單一關係。 如果你想覆蓋現有的關係,請先在導航欄的「OnModelCreating」中呼叫「忽略」。 |
| ConstructorBindingFailed(Object, Object) |
無法將 '{failedBinds}' 綁定在 '{parameters}' |
| ConstructorConflict(Object, Object) |
建構子 '{firstConstructor}' 與 '{secondConstructor}' 參數數量相同,且 Entity Framework 皆可使用。 所使用的建構器必須在「OnModelCreating」中設定。 |
| ConstructorNotFound(Object, Object) |
尚未找到適合類型 '{type}' 的建構器。 以下建構子的參數無法綁定到以下屬性:{constructors}請注意,只有映射屬性才能綁定到建構子參數。 導覽相關實體,包括對擁有型別的引用,無法綁定。 |
| ConverterBadType(Object, Object, Object) |
值轉換器 '{converter}' 無法與類型 '{type}' 一起使用。 此轉換器只能與 {allowed} 搭配使用。 |
| ConverterPropertyMismatch(Object, Object, Object, Object) |
模型類型 '{converterType}' 的轉換器無法用於 '{entityType}'。{propertyName}',因為它的型別是 '{propertyType}''。 |
| ConverterPropertyMismatchElement(Object, Object, Object, Object) |
元素類型 '{converterType}' 的轉換器無法用於 '{entityType}。{propertyName}',因為它的元素類型是 '{elementType}'。 |
| ConvertersCannotBeComposed(Object, Object, Object, Object) |
無法將 '{typeOneIn}' 的轉換器與 '{typeTwoIn}' 的轉換器合成,因為第一個轉換器的輸出類型與第二個轉換器的輸入類型不符。 |
| CustomMetadata(Object, Object, Object) |
已淘汰.
擴充方法「{method}' 正在與自訂實作的 '{interfaceType}' 一起使用。 不支援使用實體框架(Entity Framework)元資料介面的自訂實作,建議改用 '{concreteType}' 衍生。 如果您有有說服力的案例,希望自訂中繼資料介面的實作,請聯繫 Entity Framework 團隊,以便我們共同考慮實現的方法。 |
| DbContextMissingConstructor(Object) |
'AddDbContext' 是用配置呼叫的,但 context 類型 '{contextType}' 只宣告一個無參數建構子。 這表示傳給 'AddDbContext' 的設定永遠不會被使用。 如果設定傳遞給 'AddDbContext',則 '{contextType}' 應該宣告一個構造子,該建構子接受 DbContextOptions<{contextType}> ,並必須將其傳給 DbContext 的基礎建構子。 |
| DbSetIncorrectGenericType(Object, Object, Object) |
無法為實體類型 '{entityType}' 建立 DbSet,因為它屬於類型 '{entityClrType}'',但所提供的通用類型是類型 '{genericType}'。 |
| DebugViewError(Object) |
除錯檢視丟棄了{訊息}。 請於 https://aka.ms/efcorefeedback。 |
| DebugViewQueryExpressionError(Object) |
錯誤建立查詢表達式:{message}。 |
| DebugViewQueryStringError(Object) |
錯誤建立查詢字串:{message}。 |
| DefiningQueryWithKey(Object) |
實體類型 '{entityType}' 無法使用 'ToQuery' 來建立定義查詢,因為它同時定義了主鍵。 定義查詢只能用來支持沒有鍵的實體類型。 |
| DeleteBehaviorAttributeNotOnNavigationProperty(Object, Object) |
[DeleteBehavior] 屬性只能在導航中指定,且不支援構成外鍵的屬性。 從 '{type} 中移除屬性。{propertyName}'。 |
| DeleteBehaviorAttributeOnPrincipalProperty(Object, Object) |
[DeleteBehavior] 屬性只能指定在關係的依賴端。 移除 '{entityType} 中的屬性。{navigationName}'。 |
| DependentEntityTypeNotInRelationship(Object, Object, Object) |
你正在設定 '{dependentEntityType}' 和 '{principalEntityType}' 之間的關係,但你在 '{entityType}'' 上指定了外鍵。 外鍵必須定義在關係中屬於某個型別。 |
| DerivedEntityCannotBeKeyless(Object) |
無法為實體類型「{entityType}」設定基礎類型,因為它已被設定為無密鑰。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| DerivedEntityCannotHaveKeys(Object) |
無法為實體類型「{entityType}」設定基礎類型,因為它已經定義了一個或多個鍵。 只有根型才能有鍵。 |
| DerivedEntityOwnershipMismatch(Object, Object, Object, Object) |
無法將「{baseEntityType}' 設為實體類型 '{derivedEntityType}'' 的基礎類型,因為 '{ownedEntityType}' 被設定為擁有,而 '{nonOwnedEntityType}' 是非擁有。 階層中所有實體類型都必須擁有相同的所有權狀態。 如需詳細資訊和範例,請參閱 https://aka.ms/efcore-docs-owned。 |
| DerivedEntityTypeHasNoKey(Object, Object) |
實體類型 '{derivedType}' 無法設定為無鍵,因為它是衍生型別;根型別 '{rootType}' 必須改為無鍵。 如果你不打算將 '{rootType}' 包含在模型中,請確保它不被上下文實例中的 DbSet 屬性引用,或在「OnModelCreating」中對 'ModelBuilder' 的設定呼叫中被引用,或是從模型中包含的型別導覽中被引用。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| DerivedEntityTypeKey(Object, Object) |
金鑰無法在「{derivedType}' 上設定,因為它是導出型別。 該金鑰必須設定在根型別 '{rootType}'' 上。 如果你不打算將 '{rootType}' 包含在模型中,請確保它不被上下文實例中的 DbSet 屬性引用、在設定呼叫 'ModelBuilder' 中被引用,或是從模型中包含的型別導覽中被引用。 |
| DerivedTypeDefiningQuery(Object, Object) |
實體類型 '{entityType}' 無法有定義查詢,因為它是從 '{baseType}' 衍生而來。 只有基本實體類型才能有定義查詢。 |
| DiscriminatorEntityTypeNotDerived(Object, Object) |
實體類型 '{entityType}' 的判別子值無法設定,因為它並非源自 '{rootEntityType}''。 |
| DiscriminatorPropertyMustBeOnRoot(Object) |
判別子屬性無法為實體類型 '{entityType}' 設定,因為它不是繼承階層的根節點。 |
| DiscriminatorPropertyNotAllowedOnComplexCollection(Object, Object) |
無法為型別型別 '{type}' 設定判別子屬性,因為 '{containingType}' 是一個複雜的集合。 |
| DiscriminatorPropertyNotFound(Object, Object) |
無法將屬性 '{property}' 設為實體類型 '{entityType}'' 的判別子,因為它不是 '{entityType}'' 的屬性。 |
| DiscriminatorValueIncompatible(Object, Object, Object) |
實體類型 '{entityType}' 的判別值 '{value}' 無法設定,因為它無法指派到類型為 '{discriminatorType}'' 的判別符屬性。 |
| DuplicateAnnotation(Object, Object) |
註解 '{annotation}' 無法新增,因為物件 {annotatable} 上已有同名註解存在 |
| DuplicateAnnotation(Object) |
註解「{annotation}」無法新增,因為已有同名註解存在。 |
| DuplicateComplexType(Object) |
複型態 '{complexType}' 無法加入模型,因為已有同名的複型態存在。 |
| DuplicateDiscriminatorValue(Object, Object, Object) |
'{entityType1}' 的判別值為「{discriminatorValue}',這也是 '{entityType2}' 的判別值。 階層結構中的每個具體實體類型必須有唯一的判別值。 |
| DuplicateEntityType(Object) |
實體類型 '{entityType}' 無法加入模型,因為已有同名實體類型存在。 |
| DuplicateForeignKey(Object, Object, Object, Object, Object) |
外鍵 {foreignKeyProperties} 無法加入實體類型 '{entityType}'',因為同一屬性的外鍵已存在於實體類型 '{duplicateEntityType}'' 上,且目標是 '{principalType}' 上的鍵 {keyProperties}。 |
| DuplicateIndex(Object, Object, Object) |
{indexProperties} 無法被加入實體類型 '{entityType}',因為同一屬性上的未命名索引已存在於實體類型 '{duplicateEntityType}'' 上。 考慮在「OnModelCreating」中為其中一個索引加上名稱。 |
| DuplicateKey(Object, Object, Object) |
鍵 {keyProperties} 無法加入實體類型 '{entityType}'',因為同一屬性的鍵已經存在於實體類型 '{duplicateEntityType}'' 上。 |
| DuplicateNamedIndex(Object, Object, Object, Object) |
定義在 {indexProperties} 屬性上的名為 '{indexName}' 的索引無法加入實體類型 '{entityType}'',因為實體類型 '{duplicateEntityType}' 上已有同名索引存在。 |
| DuplicateNavigationsOnBase(Object, Object, Object) |
類型 '{entityType}' 無法有基礎類型 '{baseType}'',因為兩者都包含導航:{navigations}。 |
| DuplicateOwnedEntityInstance(Object, Object, Object, Object, Object) |
同一物件實例 '{entityType}' 在 '{firstOwnerType}'' 的導覽中被引用,從 '{secondNavigation}' 在 '{secondOwnerType}'' 的導覽中被引用。 擁有實體類型不能有多個擁有者指向同一個實例。 考慮建立一個物件的副本,用於每次導航。 |
| DuplicatePropertiesOnBase(Object, Object, Object, Object, Object, Object) |
類型 '{entityType}' 無法有基礎類型 '{baseType}'',因為屬性 '{derivedPropertyType}{derivedProperty}' 和 '{basePropertyType}。{baseProperty}' 之間存在衝突。 |
| DuplicatePropertyInForeignKey(Object, Object) |
{propertyList} 屬性無法用於外鍵,因為它們包含重複的 '{property}'。 |
| DuplicatePropertyInIndex(Object, Object) |
屬性 {propertyList} 無法用作索引,因為它們包含重複的 '{property}'。 |
| DuplicatePropertyInKey(Object, Object) |
{propertyList} 這些屬性無法用於鍵值,因為它們包含重複的 '{property}'。 |
| DuplicatePropertyInList(Object, Object) |
屬性清單 {propertyList} 無法使用,因為它包含重複的 -'{property}'。 |
| DuplicateServicePropertyType(Object, Object, Object, Object, Object) |
服務屬性 '{property}' 的類型 '{serviceType}' 無法加入實體類型 '{entityType}'' 中,因為同類型的服務屬性 '{duplicateName}'' 已存在於實體類型 '{duplicateEntityType}'' 上。 |
| DuplicateTrigger(Object, Object, Object) |
觸發器 '{trigger}' 無法加入實體類型 '{entityType}'',因為在實體類型 '{conflictingEntityType}'' 上已有另一個同名觸發器存在。 |
| EFMethodNotSupportedInCompiledQueries(Object) |
在使用編譯查詢或查詢篩選器時,不支援 '{methodName}'' 。 |
| EFMethodWithNonEvaluatableArgument(Object) |
'{methodName}' 方法只能用於可於客戶端評估的參數,且不包含對資料庫端實體的參考。 |
| ElementNotMapped(Object, Object, Object) |
原始集合 '{entityType}} 的元素類型 '{elementType}'。{property}' 無法映射,因為資料庫提供者不支援此類型。 考慮用值轉換器將元素值轉換成資料庫支援的型別。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-value-converters 。 或者,你可以使用 '[NotMapped]' 屬性或在 'OnModelCreating' 中使用「EntityTypeBuilder.Ignore' 來排除該屬性。 |
| ElementTypeNotCompatible(Object, Object, Object, Object) |
元素型別 '{elementType}' 與原始集合 '{entityType}} 的型別 '{collectionType}' 不相容。{property}'。 集合型別必須實作 'IEnumerable<T>',其中 'T' 可指派給元素型別。 |
| EmptyComplexType(Object) |
複數型態 '{complexType}' 沒有定義屬性。 至少設定一個屬性,或在模型中不包含此類型。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-complex-types 。 |
| EntityEqualityContainsWithCompositeKeyNotSupported(Object) |
無法將 Contains() 運算子轉換到實體 '{entityType}' 上,因為它有複合鍵。 |
| EntityEqualityOnCompositeKeyEntitySubqueryNotSupported(Object, Object) |
無法在實體類型 '{entityType}' 的子查詢表達式上翻譯 '{comparisonOperator}',因為它有合成主鍵。 請參閱 https://go.microsoft.com/fwlink/?linkid=2141942 如何重寫你的查詢信的資訊。 |
| EntityEqualityOnKeylessEntityNotSupported(Object, Object) |
無法將實體類型為「{entityType}」的表達式「{comparisonOperator}」翻譯,因為它是無鍵實體。 考慮改用實體屬性。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| EntityEqualityOnKeylessEntityNotSupported(Object) |
不支援實體類型「{entityType}」的比較,因為它是無鍵實體。 |
| EntityEqualitySubqueryWithCompositeKeyNotSupported(Object) |
此查詢會導致對子查詢進行多次評估,因為實體 '{entityType}' 具有複合鍵。 重寫你的查詢,避免使用子查詢。 |
| EntityRequiresKey(Object) |
實體類型 '{entityType}' 需要定義一個主鍵。 如果你打算使用無鍵實體類型,請在「OnModelCreating」中呼叫「HasNoKey」。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| EntityTypeInUseByDerived(Object, Object) |
實體類型 '{entityType}' 無法移除,因為 '{derivedEntityType}' 是從它衍生出來的。 在移除實體類型之前,必須移除或設定為使用不同的基礎實體類型。 |
| EntityTypeInUseByForeignKey(Object, Object, Object) |
實體類型 '{entityType}' 無法移除,因為它以外鍵 {foreignKey} 參考了 '{referencedEntityType}'。 所有外鍵必須先移除,才能移除實體類型。 |
| EntityTypeInUseByReferencingForeignKey(Object, Object, Object) |
實體類型 '{entityType}' 無法移除,因為它正被外鍵 {foreignKeyProperties} 在 '{referencingEntityType}' 上引用。 在移除實體類型之前,必須移除所有引用的外鍵。 |
| EntityTypeInUseByReferencingSkipNavigation(Object, Object, Object) |
實體類型 '{entityType}' 無法移除,因為它被跳過導覽的 '{skipNavigation}' 在 '{referencingEntityType}'' 上引用。 在移除實體類型之前,必須移除所有引用的跳過導覽。 |
| EntityTypeModelMismatch(Object, Object) |
實體類型 '{firstEntityType}' 與 '{secondEntityType}' 不屬於同一模型。 |
| EntityTypeNotFound(Object) |
未找到實體類型 '{entityType}'。 請確認實體類型已被加入模型中。 |
| EntityTypeNotInRelationship(Object, Object, Object) |
指定的實體類型 '{entityType}' 無效。 它必須是相依實體類型 '{dependentType}''、主實體類型 '{principalType}'' 或由其中之一衍生的實體類型。 |
| EntityTypeNotInRelationshipStrict(Object, Object, Object) |
指定的實體類型 '{entityType}' 無效。 它必須是相依實體類型 '{dependentType}'' 或主要實體類型 '{principalType}''。 |
| EntityTypesNotInRelationship(Object, Object, Object, Object) |
所提供的實體類型 '{invalidDependentType}' 和 '{invalidPrincipalType}' 是無效的。 指定「{dependentType}' 和 '{principalType}',或同一階層中的實體類型。 |
| ErrorMaterializingProperty(Object, Object) |
在讀取資料庫值 '{entityType} 時發生了例外。{property}'。 如需詳細資訊,請參閱內部例外狀況。 |
| ErrorMaterializingPropertyInvalidCast(Object, Object, Object, Object) |
在讀取屬性 '{entityType} 的資料庫值時發生錯誤。{property}'。 預期型別為「{expectedType}',但實際值為「{actualType}'」。 |
| ErrorMaterializingPropertyNullReference(Object, Object, Object) |
在讀取資料庫值 '{entityType} 時發生了例外。{property}'。 預期型別為「{expectedType}」,但實際值為空值。 |
| ErrorMaterializingValueInvalidCast(Object, Object) |
讀取資料庫值時發生了異常。 預期型別為「{expectedType}',但實際值為「{actualType}'」。 |
| ErrorMaterializingValueNullReference(Object) |
讀取資料庫值時發生了異常。 預期型別為「{expectedType}」,但實際值為空值。 |
| ExecuteQueriesNotSupported(Object, Object) |
目前資料庫提供者不支援 '{methodName}' 和 '{asyncMethodName}' 這兩個方法。 如需更多資訊,請聯絡資料庫提供者的出版單位。 |
| ExecutionStrategyExistingTransaction(Object, Object) |
已設定的執行策略「{strategy}' 不支援使用者主動發起的交易。 使用 '{getExecutionStrategyMethod}' 回傳的執行策略,將交易中的所有操作作為可重考單元執行。 |
| ExpressionParameterizationExceptionSensitive(Object) |
在嘗試評估 LINQ 查詢參數表達式 '{expression}' 時拋出了一個例外。 如需詳細資訊,請參閱內部例外狀況。 |
| FieldNameMismatch(Object, Object, Object) |
指定的欄位 '{field}' 無法用於屬性 '{entityType}。{property}' 因為它與屬性名稱不符。 不與 CLR 屬性相關聯的實體類型屬性必須與欄位名稱完全一致。 |
| FindNotCompositeKey(Object, Object) |
實體類型 '{entityType}' 以單一鍵特性定義,但 {valuesCount} 的值是傳遞給 'Find' 方法的。 |
| FindValueCountMismatch(Object, Object, Object) |
實體類型 '{entityType}' 是以 {propertiesCount} 部分合成鍵定義,但 {valuesCount} 的值則傳遞給 'Find' 方法。 |
| FindValueTypeMismatch(Object, Object, Object, Object) |
呼叫 'DbSet<{entityType}> 時,位置 {index} 的鍵值。Find' 的型別為 '{valueType}',但與 '{propertyType}'' 的屬性類型不符。 |
| FindWrongCount(Object, Object) |
{values} 的值會傳入 {properties} 屬性的 'FindEntry' 或 'GetEntries' 方法。 數值的數量必須與屬性的數量相匹配。 |
| FindWrongType(Object, Object, Object) |
當預期是 '{propertyType}'' 值時,'FindEntry' 或 'GetEntries' 方法會傳遞 '{valueType}'' 值,但 '{propertyName}'' 是 '{valueType}' 的值。 |
| FkAttributeOnNonUniquePrincipal(Object, Object, Object) |
[ForeignKey] 屬性無法在實體類型 '{principalType}' 上指定,因為它代表一對多的關係。 將 [ForeignKey] 屬性移到 '{dependentType}'' 上的一個屬性。 |
| FkAttributeOnPropertyNavigationMismatch(Object, Object, Object) |
屬性 '{property}' 與 navigation '{navigation}' 在實體類型 '{entityType}' 中的 [ForeignKey] 屬性彼此不指向。 請確保該屬性的 [ForeignKey] 屬性值與導航名稱相符,且導航上的 [ForeignKey] 屬性值與外鍵屬性名稱相符,否則移除其中一個屬性名稱。 |
| FkAttributeOnSkipNavigation(Object, Object) |
[ForeignKey] 屬性無法在跳過導覽的 '{entityType}'' 中指定。{導航}'。 改用「OnModelCreating」來設定外鍵屬性。 |
| ForeignKeyCountMismatch(Object, Object, Object, Object) |
實體類型 '{dependentType}' 的外鍵 {foreignKeyProperties} 所指定的屬性數量,與主鍵 {principalKeyProperties} 在實體類型 '{principalType}' 的屬性數量不符。 |
| ForeignKeyInUseSkipNavigation(Object, Object, Object, Object) |
無法從實體類型 '{entityType}'' 中移除外鍵 {foreignKeyProperties},因為它是透過跳過導覽 '{navigation}' 在實體類型 '{navigationEntityType}'' 中被引用的。 所有引用跳過導覽必須先移除,才能移除參考的外鍵。 |
| ForeignKeyPropertiesWrongEntity(Object, Object) |
指定的外鍵屬性 {foreignKeyProperties} 並未在實體類型 '{entityType}' 上宣告。 確保目標實體類型上已宣告外鍵屬性。 |
| ForeignKeyPropertyInKey(Object, Object, Object, Object) |
屬性 '{property}' 不能是 '{entityType}'' 外鍵的一部分,因為它是儲存產生的值,且包含在定義於基礎實體類型 '{baseEntityType}'' 上的鍵 {keyProperties} 中。 將 '{property}' 設定為 'ValueGeneratedNever',或改為在 '{entityType}' 上定義外鍵。 |
| ForeignKeyReferencedEntityKeyMismatch(Object, Object) |
所提供的主鍵 {principalKeyProperties} 並非實體類型 '{principalEntityType}'' 上的鍵。 提供一個在主要實體類型上定義的金鑰。 |
| ForeignKeySelfReferencingDependentEntityType(Object) |
已淘汰.
實體類型 '{dependentType}' 的外鍵無法針對同一實體類型,因為它有定義導覽。 |
| ForeignKeyTypeMismatch(Object, Object, Object, Object) |
實體類型 '{dependentType}' 上外鍵 {foreignKeyProperties} 所指定的屬性類型,與主鍵 {principalKeyProperties} 中實體類型 '{principalType}' 的屬性類型不符。 提供使用相同類型且順序相同的物件。 |
| ForeignKeyWrongType(Object, Object, Object, Object, Object) |
針對 {{principalType}' 鍵 {keyProperties} 的外鍵 {foreignKeyProperties} 無法從實體類型 '{entityType}'' 中移除,因為它定義在實體類型 '{otherEntityType}' 上。 |
| FullChangeTrackingRequired(Object, Object, Object, Object) |
實體類型 '{entityType}' 被設定為在需要完整變更追蹤通知時使用 '{changeTrackingStrategy}' 變更追蹤策略。 在 'OnModelCreating' 中使用 'ModelBuilder.HasChangeTrackingStrategy' 來設定模型中所有實體類型,以使用 '{fullStrategy}' 或 '{fullPlusStrategy}' 策略。 |
| FunctionOnClient(Object) |
'{methodName}' 方法不被支援,因為查詢已切換為客戶端評估。 這通常發生在方法的參數無法轉譯到伺服器端時。 重寫查詢以避免客戶端對參數的評估,這樣該方法才能轉譯到伺服器。 |
| FunctionOnNonEfLinqProvider(Object) |
'{function}' 只能用於 Entity Framework Core 查詢。 |
| GraphDoesNotContainVertex(Object) |
無法加入提供的邊,因為圖中不包含頂點 '{vertex}'。 |
| IdentifyingRelationshipCycle(Object) |
偵測到包含以下實體類型主鍵的關聯循環:'{entityType}'。 這樣可以防止任何實體插入而不違反儲存限制。 檢視主鍵上定義的外鍵,並至少移除或使用其他屬性。 |
| IdentityConflict(Object, Object) |
實體類型為 '{entityType}' 的實例無法被追蹤,因為另一個具有相同 {keyProperties} 鍵值的實例正在被追蹤。 附加現有實體時,請確定只附加一個具有指定索引鍵值的實體實例。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看這些相互衝突的鍵值。 |
| IdentityConflictOwned(Object, Object) |
實體類型為 '{entityType}' 的實例無法被追蹤,因為另一個具有相同 {keyProperties} 鍵值的實例正在被追蹤。 替換擁有實體時,修改屬性但不更改實例,或先分離先前擁有實體的條目。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看這些相互衝突的鍵值。 |
| IdentityConflictOwnedSensitive(Object, Object) |
實體類型為 '{entityType}' 的實例無法被追蹤,因為另一個具有鍵值 '{keyValue}' 的實例已被追蹤。 替換擁有實體時,修改屬性但不更改實例,或先分離先前擁有實體的條目。 |
| IdentityConflictSensitive(Object, Object) |
實體類型為 '{entityType}' 的實例無法被追蹤,因為另一個具有鍵值 '{keyValue}' 的實例已被追蹤。 附加現有實體時,請確定只附加一個具有指定索引鍵值的實體實例。 |
| ImplementationTypeRequired(Object) |
無法確定 '{service}' 服務註冊的實作類型。 對於預期多重註冊的服務,必須使用特定的實作類型,以避免重複。 |
| IncludeBadNavigation(Object, Object) |
屬性 '{property}' 並非實體類型 '{entityType}'' 的導航屬性。 「Include(string)」方法只能搭配以 '.' 分隔的導航屬性名稱清單使用。 |
| IncludeNotSpecifiedDirectlyOnEntityType(Object, Object) |
Include 操作 '{include}' 不支援。 「{invalidNavigation}' 必須是定義在實體類型上的導航屬性。 |
| IncludeOnEntityWithDefiningQueryNotSupported(Object, Object) |
已淘汰.
在實體類型 '{entityType}' 上,參數為 '{expression}' 的「Include」操作不被支援,因為它有定義查詢。 |
| IncludeOnEntityWithDefiningQueryNotSupported(Object) |
包含不支援具有定義查詢的實體。 實體類型:'{entityType}' |
| IncludeOnNonEntity(Object) |
無法在參數 '{expression}' 下套用「Include」操作。 要麼來源不是已知實體類型的可查詢對象,要麼在「Select」方法後套用了「包含」,該方法透過導航投影出不同的實體類型。 考慮在呼叫「Select」方法前先套用「包含」。 |
| IncludeWithCycle(Object, Object) |
包含路徑 '{navigationName}->{inverseNavigationName}' 會形成一個循環。 無追蹤查詢不允許週期;要麼使用追蹤查詢,要麼移除循環。 |
| IncompatibleSentinelValue(Object, Object, Object, Object) |
sentinel 值 '{sentinel}' 無法指派到 '{entityType} 屬性。{property}' 型別為 '{type}'。 |
| InconsistentInheritance(Object, Object, Object) |
實體類型 '{entityType}' 設定為源自 '{baseEntityType}',但根據對應 CLR 類型的階層結構,應由 '{clrBaseEntityType}'' 衍生。 設定 '{entityType}' 的基礎類型是 '{baseEntityType}'' 或 'null'。 |
| InconsistentInheritance(Object, Object) |
實體類型 '{entityType}' 應由 '{baseEntityType}' 衍生,以反映對應 CLR 類型的階層結構。 |
| InconsistentOwnership(Object, Object) |
已淘汰.
實體類型 '{ownedEntityType}' 被設定為擁有,但實體類型 '{nonOwnedEntityType}' 則不是。 將所有實體類型配置為與 CLR 共享的導航類型,並以 'OnModelCreating' 擁有的 CRR 類型為單位。 |
| IncorrectNumberOfArguments(Object, Object, Object) |
'{method}' 以 {argumentCount} 參數呼叫,但參數為 {parameterCount}。 |
| IndexOnComplexCollection(Object, Object, Object) |
實體類型 '{entityType}' 的索引 {indexProperties} 無法設定,因為它遍歷了複雜的集合 '{property}'。 索引不能引用路徑經過複雜集合的屬性。 |
| IndexOnComplexProperty(Object, Object, Object) |
實體類型 '{entityType}' 的索引 {indexProperties} 無法設定,因為它是以複雜屬性 '{property}' 定義的。 複雜屬性不支援索引。 |
| IndexPropertiesWrongEntity(Object, Object) |
指定的索引屬性 {indexProperties} 並未在實體類型 '{entityType}' 上宣告。 確保目標實體類型上宣告了索引屬性。 |
| IndexPropertyMustBePropertyOrComplexProperty(Object, Object) |
實體類型 '{entityType}' 上的索引屬性 '{property}' 無法設定,因為它不是純量屬性或複雜屬性。 索引僅能參考純量性質與複雜性質。 |
| IndexValueFactoryWithComplexProperty(Object, Object, Object) |
無法為實體類型 '{entityType}' 的索引 {indexProperties} 建立值工廠,因為它包含複雜的屬性 '{property}'。 對於包含複雜屬性的索引,不支援索引價值工廠。 |
| IndexWrongType(Object, Object, Object) |
索引 {index} 無法從實體類型 '{entityType}'' 中移除,因為它是在實體類型 '{otherEntityType}'' 上定義的。 |
| InheritedPropertyCannotBeIgnored(Object, Object, Object) |
屬性 '{property}' 在類型 '{type}' 上無法忽略,因為它是在基礎類型 '{baseType}' 上宣告的。 要從你的模型中排除這個屬性,請在「OnModelCreating」的基底類型中使用 [NotMapped] 屬性或「忽略」。 |
| InterfacePropertyNotAdded(Object, Object, Object) |
屬性為 '{entityType}。{navigation}' 屬於介面類型('{propertyType}')。 如果是導航,請手動設定此屬性的關聯,將其投射為映射實體類型。 否則,請使用 [NotMapped] 屬性忽略該屬性,或在 “OnModelCreating” 中選擇「忽略」。 |
| IntraHierarchicalAmbiguousTargetEntityType(Object, Object, Object, Object) |
已淘汰.
與「{entityType}' 相關的實體類型無法確定,因為指定的外鍵 {foreignKeyProperties} 參考的是實體類型 '{principalEntityType}',而該類型與宣告於 '{dependentEntityType}'' 的實體類型屬於同一階層結構。 |
| InvalidAlternateKeyValue(Object, Object) |
無法追蹤類型為「{entityType}」的實體,因為替代金鑰屬性 '{keyProperty}' 為空。 如果在關係中沒有使用替代鍵,則考慮使用唯一索引。 唯一索引可能包含空值,而替代鍵則可能不含。 |
| InvalidCollectionIndicesEntryLength(Object, Object, Object, Object) |
在索引 {indexProperties} 上的屬性 '{property}' 的集合索引條目有 {actualCount} 元素,但屬性路徑會穿越 {expectedCount} 複雜的集合。 |
| InvalidComplexType(Object) |
指定的類型「{type}」必須是非介面型別,且有公共建構子作為複合型態使用。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-complex-types 。 |
| InvalidEntityType(Object) |
指定的類型 '{type}' 必須是非介面參考類型,才能用作實體類型。 |
| InvalidEntityTypeConfigurationAttribute(Object, Object) |
類型為 '{entityTypeConfigurationType}' 的實體類型配置無效。 使用 EntityTypeConfigurationAttribute 指定的設定必須實作 'IEntityTypeConfiguration<{entityType}>'。 |
| InvalidEnumValue(Object, Object, Object) |
參數 '{argumentName}' 所提供的值 '{value}' 必須是 enum 類型 '{enumType}'' 的有效值。 |
| InvalidEnumValue(Object, Object) |
參數 '{argumentName}' 所提供的值必須是 enum 類型的有效值 '{enumType}''。 |
| InvalidIncludeExpression(Object) |
在 'Include' 操作中,表達式 '{expression}' 無效,因為它不代表屬性存取:'t => t.MyProperty'。 要針對導出型別宣告的導覽,請使用 casting ('t => ((Derived)t)。MyProperty')或「as」運算子('t => (t 作為 Dedived)。我的財產)。 集合導航存取可透過組合 Where、OrderBy(降序)、ThenBy(降序)、跳過或取操作來篩選。 欲了解更多關於納入相關資料的資訊,請參見 https://go.microsoft.com/fwlink/?LinkID=746393。 |
| InvalidIncludeLambdaExpression(Object, Object) |
{methodName} 屬性 lambda 表達式 '{includeLambdaExpression}' 無效。 這個表達式應該代表屬性存取:'t => t.MyProperty'。 要針對導出型別宣告的導覽,請指定目標型別的 lambda 參數,例如 '(Derived d) => d.MyProperty'。 欲了解更多關於納入相關資料的資訊,請參見 http://go.microsoft.com/fwlink/?LinkID=746393。 |
| InvalidKeyValue(Object, Object) |
無法追蹤類型為 '{entityType}' 的實體,因為其主鍵屬性 '{keyProperty}' 為空。 |
| InvalidMemberAccessChainExpression(Object) |
表達式「{expression}」並非有效的成員存取表達式。 表達式應代表一個簡單的屬性或欄位存取:'t => t.MyProperty',或是透過非集合複雜屬性的成員存取鏈:'t => t.MyComplex.MyProperty'。 |
| InvalidMemberExpression(Object) |
表達式「{expression}」並非有效的成員存取表達式。 這個表達式應該代表一個簡單的屬性或欄位存取:'t => t.MyProperty'。 |
| InvalidMembersExpression(Object) |
表達式「{expression}」並非有效的成員存取表達式。 這個表達式應該代表一個簡單的屬性或欄位存取:'t => t.MyProperty'。 在指定多個屬性或欄位時,請使用匿名型別:'t => new {{ t.MyProperty, t.MyField }}'。 |
| InvalidNavigationWithInverseProperty(Object, Object, Object, Object) |
屬性 '{1_entityType} 上的 [InverseProperty] 屬性。{0_property}' 不成立。 屬性 '{referencedProperty}' 在相關類型 '{referencedEntityType}' 上並非有效的導覽。 確保該財產存在且是有效的參考或收藏導航。 |
| InvalidNumberOfIndexCollectionIndices(Object, Object, Object) |
{indexProperties} 提供的索引集合索引條目數量無效:{numValues} 條目已提供,但該索引擁有 {numProperties} 屬性。 |
| InvalidNumberOfIndexSortOrderValues(Object, Object, Object) |
{indexProperties} 提供的索引排序順序值數量不正確:{numValues} 值已提供,但索引有 {numProperties} 屬性。 |
| InvalidPropertiesExpression(Object) |
已淘汰.
屬性表達式「{expression}」無效。 這個表達式應該代表一個簡單的屬性存取:'t => t.MyProperty'。 在指定多個屬性時,請使用匿名型別:'t => new {{ t.MyProperty1, t.MyProperty2 }}'。 |
| InvalidPropertyExpression(Object) |
已淘汰.
表達式「{expression}」並非有效的性質表達式。 這個表達式應該代表一個簡單的屬性存取:'t => t.MyProperty'。 |
| InvalidPropertyListOnNavigation(Object, Object, Object) |
屬性清單是使用 [ForeignKey(“{2_properties}]] 在導覽上的屬性 '{1_entityType} 指定。{0_navigation}' 是錯誤的。 提供一份逗號分隔的房產名稱清單。 |
| InvalidPropertyListOnNavigation(Object, Object) |
屬性清單在導航中使用 [ForeignKey] 屬性指定為 '{1_entityType}。{0_navigation}' 是錯誤的。 屬性值應該是逗號分隔的屬性名稱列表。 |
| InvalidRelationshipUsingDataAnnotations(Object, Object, Object, Object) |
使用 [InverseProperty] 和 [ForeignKey] 屬性指定了一個無效的關係。 導航標示「{1_entityType}」。{0_navigation}' 和 '{3_referencedEntityType}。{2_referencedNavigation}' 透過 [InverseProperty] 屬性相關聯,但兩種導航指定的 [ForeignKey] 屬性值不同。 要麼指定相同的屬性,要麼移除其中一個屬性。 |
| InvalidReplaceService(Object, Object) |
曾呼叫「{replaceService}」,但 Entity Framework 並未建立自己的內部服務提供者。 要麼允許 Entity Framework 透過移除對 '{useInternalServiceProvider}'' 的呼叫來建立服務提供者,要嘛在將服務提供者交給「{useInternalServiceProvider}'' 之前先建置替代服務。 |
| InvalidSetKeylessOperation(Object) |
呼叫的方法無法用於實體類型「{entityType}」,因為它沒有主鍵。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| InvalidSetSameTypeWithDifferentNamespace(Object, Object) |
無法為 '{typeName}' 建立資料庫集,因為這個型別未包含在上下文模型中。 然而,模型中包含一個名稱相同的實體類型,且存在於另一個命名空間:'{entityTypeName}'。 |
| InvalidSetSharedType(Object) |
無法為「{typeName}」建立資料庫集合,因為它被設定為共享型實體類型。 透過接受實體類型名稱的「Set」方法過載存取實體類型。 |
| InvalidSetType(Object) |
無法為 '{typeName}' 建立資料庫集,因為這個型別未包含在上下文模型中。 |
| InvalidSetTypeOwned(Object, Object) |
無法為「{typeName}' 建立資料庫集,因為它被設定為擁有實體類型,必須透過其擁有實體類型 '{ownerType}' 存取。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-owned 。 |
| InvalidSetTypeOwned(Object) |
無法為 '{typeName}}' 建立資料庫集,因為它被設定為擁有實體類型,必須透過其擁有實體類型存取。 |
| InvalidSetTypeWeak(Object) |
已淘汰.
無法為 '{typeName}' 建立資料庫集,因為它被映射到多個具有導覽定義的實體類型,且應該透過擁有的實體來存取。 |
| InvalidStructuredJsonPathIndexCount(Object, Object) |
所提供的索引數量({inindexesCount})必須與 JSON 路徑中的陣列區段數({arraySegmentCount})相匹配。 |
| InvalidSwitch(Object, Object) |
無效 {name}: {value} |
| InvalidType(Object, Object, Object, Object) |
屬性的價值為 '{1_entityType}。{0_property}' 無法被設定為 '{valueType}'' 的值,因為它的類型是 '{propertyType}''。 |
| InvalidTypeConversationWithInclude(Object, Object) |
無法包含由「Include」操作指定的導覽鏈「{includeExpression}」,作為轉換後的類型「{type}」,則不屬於模型。 |
| InvalidTypeConversionWithInclude(Object, Object) |
無法包含由「Include」操作指定的導航鏈「{includeExpression}」,作為轉換後的類型「{type}」,則不屬於模型。 |
| InvalidUseService(Object, Object, Object) |
曾呼叫「{useService}」,但 Entity Framework 並未建立自己的內部服務提供者。 要麼允許 Entity Framework 透過移除對 '{useInternalServiceProvider}}' 的呼叫來建立服務提供者,要嘛先將「{service}' 服務建置到服務提供者中,再傳給 '{useInternalServiceProvider}''。 |
| InvalidValueGeneratorFactoryProperty(Object, Object, Object) |
「{factory}」無法為屬性「{2_entityType} 建立值產生元。{1_property}'。 僅支援整數性質。 |
| InversePropertyMismatch(Object, Object, Object, Object) |
[InverseProperty] 屬性在導航 '{1_entityType} 上。{0_navigation}'」,導航時則是「{3_referencedEntityType}。{2_referencedNavigation}' 彼此不指向。 將屬性改成使用對應名稱,或移除其中一個屬性。 |
| InverseToOwnedType(Object, Object, Object, Object) |
導航 '{principalEntityType}.{navigation}' 不支援,因為它指向一個擁有的實體類型 '{ownedType}''。 只有實體類型 '{ownerType}' 的所有權導航能指向擁有實體類型。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-owned 。 |
| IQueryableNotAsync(Object) |
原始碼 'IQueryable' 並未實作 'IAsyncEnumerable<{genericParameter}>'。 只有實作「IAsyncEnumerable」的原始碼才能用於 Entity Framework 的非同步操作。 |
| JsonReaderInvalidTokenType(Object) |
無效的標記類型:'{tokenType}'. |
| KeyAttributeOnDerivedEntity(Object, Object, Object) |
衍生型別 '{derivedType}' 不能在屬性 '{property}' 上有 [Key] 屬性,因為主鍵只能在根型上宣告。 將屬性 '{property}' 移到 '{rootType}'' 或透過 [NotMapped] 屬性或在 'OnModelCreating' 的基底類型中呼叫「EntityTypeBuilder.Ignore' 移除。 |
| KeyAttributeOnDerivedEntity(Object, Object) |
衍生型別 '{derivedType}' 不能在屬性 '{property}' 上有 [Key] 屬性,因為主鍵只能在根型上宣告。 |
| KeyInUse(Object, Object, Object, Object) |
無法從實體類型 '{entityType}'' 中移除金鑰 {keyProperties},因為它是由定義在實體類型 '{dependentType}'' 上的外鍵 {foreignKeyProperties} 所引用。 移除或更改所有引用外鍵的主鍵,再移除該金鑰。 |
| KeyInUse(Object, Object, Object) |
無法移除實體類型 '{entityType}' 中的 {key} 鍵,因為它是由實體類型 '{dependentType}'' 的外鍵所引用。 所有外鍵必須先移除或重新定義,才能移除所參考的金鑰。 |
| KeylessTypeExistingKey(Object, Object) |
實體類型 '{entityType}' 無法標記為無鍵,因為它包含一個鍵 {keyProperties}。 |
| KeylessTypeExistingKey(Object) |
實體類型 '{entityType}' 無法標記為無鍵,因為它包含一個鍵。 |
| KeylessTypeTracked(Object) |
無法追蹤類型為 '{type}' 的實例,因為它沒有主鍵。 只有具有主鍵的實體類型才能被追蹤。 |
| KeylessTypeWithKey(Object, Object) |
鍵 {keyProperties} 不能加入無鍵型別 '{entityType}'。 |
| KeyOnComplexCollection(Object, Object, Object) |
實體類型 '{entityType}' 的鍵 {keyProperties} 無法設定,因為它遍歷了複雜的集合 '{property}'。 鍵不能參考路徑經過複雜集合的屬性。 |
| KeyOnNullableComplexProperty(Object, Object, Object) |
實體類型 '{entityType}' 的鍵 {keyProperties} 無法設定,因為它遍歷的複雜屬性 '{property}' 是可選的。 標記複數屬性,以便將其屬性作為鍵的一部分使用。 |
| KeyPropertiesWrongEntity(Object, Object) |
指定的金鑰屬性 {keyProperties} 並未在實體類型 '{entityType}' 上宣告。 確保目標實體類型中宣告了關鍵屬性。 |
| KeyPropertyCannotBeNullable(Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 無法被標記為可空/可選,因為它已被包含在 {keyProperties} 鍵中。 |
| KeyPropertyInForeignKey(Object, Object) |
屬性 '{property}' 不能成為 '{entityType}' 鍵的一部分,因為它啟用了值產生功能,且包含在衍生實體類型上定義的外鍵中。 |
| KeyPropertyMustBeReadOnly(Object, Object) |
性質 '{1_entityType}。{0_property}' 在儲存後必須標記為唯讀,因為它是金鑰的一部分。 一旦實體首次被儲存,關鍵屬性總是只讀。 |
| KeyReadOnly(Object, Object) |
性質 '{1_entityType}。{0_property}' 是鍵的一部分,因此無法被修改或標記為已修改。 若要變更具有識別外鍵的現有實體主體,請先刪除相依專案並叫用 『SaveChanges』,然後將相依專案與新的主體產生關聯。 |
| KeyWrongType(Object, Object, Object) |
鍵 {keyProperties} 無法從實體類型 '{entityType}' 中移除,因為它是以實體類型 '{otherEntityType}'' 定義的。 |
| LiteralGenerationNotSupported(Object) |
'{type}' 的型別映射尚未實作程式碼字面產生。 |
| ManyToManyOneNav(Object, Object) |
導航 '{entityType}.{navigation}' 不能同時用於多對多關係的雙方。 多對多關係必須使用兩個不同的導航性質。 |
| MissingBackingField(Object, Object, Object) |
在屬性 '{2_entityType} 中找不到指定的欄位 '{field}'。{1_property}'。 |
| MissingInverseManyToManyNavigation(Object, Object) |
無法在實體類型 '{principalEntityType}' 與 '{declaringEntityType}' 之間建立多對多關係,因為其中一種導航未被指定。 在「OnModelCreating」中的「HasMany」呼叫中提供導航。 考慮為此增建私人財產。 |
| ModelNotFinalized(Object) |
必須先完成模型最終化,並初始化其執行時相依關係,才能使用 '{method}'。 請確保 'OnModelCreating' 已經完成,或者如果使用獨立的 'ModelBuilder',則是 'IModelRuntimeInitializer.Initialize(model.FinalizeModel()' 被命名為 FinalizeModel()'。 |
| MultipleEntries(Object) |
無法開始追蹤 '{entityType}' 實體類型 '{entityType}' 的 InternalEntityEntry,因為另一個 InternalEntityEntry 已經在追蹤同一實體。 |
| MultipleFilteredIncludesOnSameNavigation(Object, Object) |
篩選器 '{filter1}' 和 '{filter2}' 都設定在同一個導覽中。 每個導航只允許一個獨特篩選器。 欲了解更多關於納入相關資料的資訊,請參見 https://go.microsoft.com/fwlink/?LinkID=746393。 |
| MultipleNavigationsSameFk(Object, Object, Object) |
實體類型 '{entityType}' 中有多個導覽,它們透過 [ForeignKey] 屬性 {navigations} 指向同一組屬性 '{properties}'。 |
| MultipleNavigationsSameFk(Object, Object) |
在實體類型 '{entityType}' 中,有多個導覽透過 [ForeignKey] 屬性指向同一組屬性:'{propertyList}' |
| MultipleOwnerships(Object, Object) |
實體類型 '{entityType}' 是多重所有權關係的目標:{navigations}。 |
| MultipleOwnerships(Object) |
實體類型 '{entityType}' 是多重所有權關係的目標。 |
| MultipleProvidersConfigured(Object) |
資料庫服務提供者的 {storeNames} 服務已在服務提供者中註冊。 服務提供者中只能註冊單一資料庫提供者。 如果可能,請確保 Entity Framework 正在管理其服務提供者,移除對「UseInternalServiceProvider」的呼叫。 否則,可以考慮有條件地註冊資料庫提供者,或是每個資料庫提供者維持一個服務提供者。 |
| MustRewriteToSameNode(Object, Object) |
當從 '{caller}' 呼叫時,重寫 '{type}' 型別的節點必須回傳同型別的非空值。 或者,可以覆寫 '{caller}',並改成不造訪此類子節點。 |
| MutableKeyProperty(Object) |
屬性 '{keyProperty}' 無法設定為「ValueGeneratedOnUpdate」或「ValueGeneratedOnAddOrUpdate」,因為它是鍵的一部分,且在實體加入儲存後其值無法更改。 |
| NamedIndexDefinedOnIgnoredProperty(Object, Object, Object, Object) |
在實體類型 '{entityType}' 上,透過 [Index] 屬性指定的索引 '{indexName}} 無效。 屬性 '{propertyName}' 已被 [NotMapped] 屬性或 'EntityTypeBuilder.Ignore' 流暢 API 標記為未映射。 索引不能使用未映射的屬性。 |
| NamedIndexDefinedOnNonExistentProperty(Object, Object, Object, Object) |
透過實體類型 '{entityType}'' 上的 [Index] 屬性指定的索引 '{indexName}' 會參考屬性 {indexProperties},但該實體類型或其任何基礎類型中都不存在名為 '{propertyName}' 的屬性。 |
| NamedIndexWrongType(Object, Object) |
名為 {indexName} 的索引無法從實體類型 '{entityType}' 中移除,因為該實體類型上不存在此類索引。 |
| NavigationArray(Object, Object, Object) |
導航類型為「{1_entityType}。{0_navigation}' 是 '{foundType}',這是一個陣列類型。 收藏導航不能是陣列。 |
| NavigationBadType(Object, Object, Object, Object) |
導航類型為「{1_entityType}。{0_navigation}' 是 '{foundType}',並未實作 'ICollection<{targetType}>''。 集合導航必須實作目標類型的「ICollection<>」。 |
| NavigationCannotCreateType(Object, Object, Object) |
導航類型為「{1_entityType}。{0_navigation}' 是無法建立具體實例的 '{foundType}'。 在使用前先初始化該屬性,或在型別中加入一個無參數的公開建構子,或使用可被指派為「HashSet<>」或「List<>」的型別。 |
| NavigationCollectionWrongClrType(Object, Object, Object, Object) |
集合導覽 '{navigation}' 無法加入實體類型 '{entityType}'',因為其 CLR 類型 '{clrType}' 並未實作 'IEnumerable<{targetType}>''。 集合導航必須實作相關實體的 IEnumable<> 。 |
| NavigationForWrongForeignKey(Object, Object, Object, Object) |
導航「{1_entityType}。{0_navigation}' 無法與外鍵 {targetForeignKeyProperties} 關聯,因為它是為外鍵 {actualForeignKeyProperties} 所建立。 |
| NavigationFromShadowEntity(Object, Object) |
已淘汰.
導航 '{navigation}' 無法加入實體類型 '{entityType}',因為它定義於影子狀態,而導航屬性不能來自影子狀態實體。 |
| NavigationIsProperty(Object, Object, Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 是使用 '{referenceMethod}' 或 '{collectionMethod}' 方法存取,但在模型中被定義為非導覽。 使用 '{propertyMethod}' 方法來存取非導覽屬性。 |
| NavigationlessOwnership(Object, Object) |
'{principalEntityType}' 與 '{dependentEntityType}' 之間的關係無法設定為擁有權,因為沒有關聯到擁有型別的導覽。 所有權必須始終伴隨導航。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-owned 。 |
| NavigationNoSetter(Object, Object) |
導航「{1_entityType}。{0_navigation}' 沒有設定欄位,也沒有找到或指定可寫的後盾欄位。 唯讀集合導航必須在使用前初始化。 |
| NavigationNotAdded(Object, Object, Object) |
無法判斷由導航 '{entityType} 所代表的關係。{navigation}' 型別為 '{propertyType}''。 你可以手動設定這個關係,或是用 '[NotMapped]' 屬性,或在 'OnModelCreating' 裡用「EntityTypeBuilder.Ignore' 忽略這個屬性。 |
| NavigationNotAddedAdHoc(Object, Object, Object) |
屬性為 '{entityType}。{navigation}' 的類型 '{propertyType}' 看起來是導向另一種實體類型的導航。 使用 'SqlQuery' 時不支援導覽功能。 你可以在模型中包含此類型並使用 'FromSql' 作為查詢,或是使用 '[NotMapped]' 屬性忽略此屬性。 |
| NavigationNotAddedComplexType(Object, Object, Object) |
無法設定導航 '{complexType}.{navigation}' 的類型為 '{propertyType}'',因為複雜型別不支援導航。 請使用 '[NotMapped]' 屬性或在 'OnModelCreating' 中使用「EntityTypeBuilder.Ignore' 來忽略此屬性。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-complex-types 。 |
| NavigationSingleWrongClrType(Object, Object, Object, Object) |
導覽 '{navigation}' 無法加入實體類型 '{entityType}'',因為其 CLR 類型 '{clrType}' 與預期的 CLR 類型 '{targetType}'' 不符。 |
| NavigationToKeylessType(Object, Object) |
導覽 '{navigation}' 無法新增,因為它針對的是無鍵實體類型 '{entityType}''。 導航只能用鍵鎖定實體類型。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| NavigationToShadowEntity(Object, Object, Object) |
已淘汰.
導覽 '{navigation}' 無法加入實體類型 '{entityType}'',因為目標實體類型 '{targetType}' 是定義在影子狀態中,而導航屬性無法指向影子狀態實體。 |
| NoBackingField(Object, Object, Object) |
未發現地名「{1_entityType}的背景田地。{0_property}'。 請將背板欄位命名為依照慣例被發現,或設定該背板欄位為使用,或使用不同的 '{propertyAccessMode}''。 |
| NoBackingFieldLazyLoading(Object, Object) |
未發現地名「{1_entityType}的背景田地。{0_property}'。 懶惰載入的導航必須有後台欄位。 要麼將背景欄位命名,使其依照慣例被發現,要麼設定背景欄位以啟用。 |
| NoClrNavigation(Object, Object) |
導覽 '{navigation}' 無法加入實體類型 '{entityType}',因為底層類型上沒有對應的 CLR 屬性,且無法在影子狀態下新增導航屬性。 |
| NoClrType(Object) |
CLR 實體實體化器無法用於實體類型 '{entityType}',因為它是影子狀態實體類型。 僅適用於具有對應 CLR 類型的實體類型,才能實現為 CLR 類型。 |
| NoDefiningNavigation(Object, Object, Object) |
已淘汰.
用來定義實體類型 '{entityType}' 的導覽 '{navigation}' 在 '{definingEntityType}'' 中並不存在。 |
| NoDiscriminatorForValue(Object, Object) |
無法為實體類型 '{entityType}' 設定判別器值,因為根實體類型 '{rootEntityType}' 沒有設定判別符屬性。 |
| NoDiscriminatorProperty(Object) |
實體類型 '{entityType}' 屬於階層結構,但未設定判別子屬性。 |
| NoDiscriminatorValue(Object) |
實體類型 '{entityType}' 具有判別器屬性,但未設定判別器值。 |
| NoFieldOrGetter(Object, Object) |
無法找到屬性 '{1_entityType} 的背景欄位。{0_property}'',且該性質沒有 getter。 |
| NoFieldOrSetter(Object, Object) |
無法找到屬性 '{1_entityType} 的背景欄位。{0_property}',且該屬性沒有設定器。 |
| NoGetter(Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 沒有 getter。 要麼讓屬性可讀,要麼使用不同的 '{propertyAccessMode}''。 |
| NoIndexer(Object) |
在實體類型「{entity}」中新增了一個索引屬性。 但在 '{entity}' 上沒有公開索引器,該索引器只取一個型別為 'string' 的參數並回傳型別 'object'。 |
| NoNavigation(Object, Object) |
已淘汰.
在實體類型 '{entityType}' 上,外鍵 {foreignKeyProperties} 沒有導航功能。 |
| NonClrBaseType(Object, Object) |
已淘汰.
實體類型 '{entityType}' 無法繼承自 '{baseEntityType}'',因為 '{baseEntityType}' 是影子狀態實體類型,而 '{entityType}' 不是。 |
| NonComparableKeyType(Object, Object, Object) |
屬性 '{entityType}.{property}' 無法用作鍵,因為它的類型為 '{providerType}',且未實作 'IComparable<T>'、'IComparable' 或 'IStructuralComparable'。 在 'OnModelCreating' 中使用 'HasConversion' 來包裝 '{providerType}' 並以可比較的類型。 |
| NonComparableKeyTypes(Object, Object, Object, Object) |
屬性 '{entityType}.{property}' 無法用作鍵,因為它有 '{modelType}'' 和提供者類型 '{providerType}'',這兩者都未實作 'IComparable<T>'、'IComparable' 或 'IStructuralComparable'。 讓 '{modelType}' 實作其中一個介面,將其用作鍵。 |
| NonConfiguredNavigationToSharedType(Object, Object) |
導航「{1_entityType}。{0_navigation}' 必須在 'OnModelCreating' 中設定,並明確命名目標共享型實體類型,或透過呼叫「EntityTypeBuilder.Ignore」來排除。 |
| NonDefiningOwnership(Object, Object, Object) |
已淘汰.
實體類型 '{2_entityType}' 由 '{0_ownershipNavigation}' 擁有,應使用定義導航 '{1_definingNavigation}'' 來定義。 |
| NonGenericOptions(Object) |
傳給 {contextType} 建構子的 DbContextOptions 必須是 DbContextOptions<{contextType}>。 註冊多個 DbContext 類型時,請確保每個上下文類型的建構子都包含 DbContextOptions<TContext> 參數,而非非通用的 DbContextOptions 參數。 |
| NonIndexerEntityType(Object, Object, Object) |
無法新增索引器屬性 '{property}',因為 '{entityType}' 上沒有索引器,且無法從 '{type}' 指派一個類型為參數的索引器。 |
| NonListCollection(Object, Object, Object, Object) |
複雜的集合 '{entityType}'。{name}' 屬於 '{type}' 型別,並未實作「{listInterface}'」。 |
| NonNotifyingCollection(Object, Object, Object, Object) |
集合類型 '{2_collectionType}' 用於導航 '{1_entityType}。{0_navigation}' 並未實作「INotifyCollectionChanged」。 任何設定使用 '{changeTrackingStrategy}' 變更追蹤策略的實體類型,都必須使用實作「INotifyCollectionChanged」的集合。 可以考慮使用「ObservableCollection<T>」。 |
| NonNotifyingCollection(Object, Object, Object) |
用於導航的集合類型為 '{1_entityType}。{0_navigation}' 並未實作「INotifyCollectionChanged」。 任何設定使用 '{changeTrackingStrategy}' 變更追蹤策略的實體類型,都必須使用實作「INotifyCollectionChanged」的集合。 可以考慮使用「ObservableCollection<T>」。 |
| NonQueryTranslationFailed(Object) |
以下的「ExecuteUpdate」或「ExecuteDelete」表達式無法被翻譯,詳情請參見內部例外:「{expression}' |
| NonQueryTranslationFailedWithDetails(Object, Object) |
LINQ 表達式「{expression}」無法被翻譯。 更多資訊:{details} 請參閱 https://go.microsoft.com/fwlink/?linkid=2101038 。 |
| NonShadowBaseType(Object, Object) |
已淘汰.
實體類型 '{entityType}' 無法繼承自 '{baseEntityType}',因為 '{entityType}' 是影子狀態實體類型,而 '{baseEntityType}' 不是。 |
| NonUniqueRequiredDependentForeignKey(Object, Object) |
實體類型 '{declaringEntityType}' 的外鍵 {foreignKeyProperties} 無法有必須的依賴端,因為它並非唯一。 |
| NonUniqueRequiredDependentNavigation(Object, Object) |
'{principalEntityType}.{principalNavigation}' 無法依需求設定,因為它是設定為集合。 |
| NoParameterlessConstructor(Object) |
在實體類型 '{entityType}' 上找不到無參數建構子。 為了建立 '{entityType}'' 的實例,Entity Framework 要求宣告一個無參數的建構子。 |
| NoProperty(Object, Object, Object) |
實體類型為「{entity}」的欄位「{field}」沒有相關屬性。 要麼設定一個屬性,要麼使用不同的 '{propertyAccessMode}''。 |
| NoPropertyType(Object, Object) |
屬性 '{property}' 無法加入類型 '{type}',因為未指定屬性類型,且沒有對應的 CLR 屬性或欄位。 要新增影子狀態屬性,必須指定屬性類型。 |
| NoProviderConfiguredFailedToResolveService(Object) |
無法解析 '{service}' 類型的服務。 這通常是因為尚未為此資料庫上下文設定資料庫提供者。 提供者可以透過覆寫「DbContext.OnConfiguring」方法或在應用程式服務提供者上使用「AddDbContext」來設定。 如果使用 'AddDbContext',也請確保你的 DbContext 類型在其建構子中接受 DbContextOptions<TContext> 物件,並將其傳給 DbContext 的基礎建構子。 |
| NoSetter(Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 沒有二傳手。 要麼讓屬性可寫,要麼使用不同的 '{propertyAccessMode}''。 |
| NotAnEFService(Object) |
資料庫提供者嘗試註冊 '{service}' 服務的實作。 這不是 Entity Framework 定義的服務,因此必須使用 'TryAddProviderSpecificServices' 方法註冊為提供者專用服務。 |
| NotAProviderService(Object) |
資料庫提供者嘗試註冊 '{service}' 服務的實作。 這是由 Entity Framework 定義的服務,因此不得使用 'TryAddProviderSpecificServices' 方法註冊。 |
| NotAssignableClrBaseType(Object, Object, Object, Object) |
實體類型 '{entityType}' 無法繼承自 '{baseEntityType}',因為 '{clrType}' 並非 '{baseClrType}'' 的後代。 |
| NotCollection(Object, Object) |
屬性為 '{entityType}。{property}' 無法映射為集合,因為它未實作 'IEnumerable<T>'。 |
| NotParameterizedAttributeWithNonConstantNotSupportedInPrecompiledQueries(Object, Object) |
在預編譯查詢時,方法「{method}' 的 '{parameter}' 參數無法被參數化。 |
| NoValueGenerator(Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 沒有值集,且無法針對類型為 '{propertyType}'' 的屬性產生值。 要麼在新增實體前先設定屬性值,要麼在 'OnModelCreating' 中設定屬性類型為 '{propertyType}' 的值產生器。 |
| NullableKey(Object, Object) |
實體類型 '{entityType}' 的鍵不能包含屬性 '{property}',因為它是可空/可選的。 所有宣告金鑰的屬性都必須標記為不可空(non-nullable/required)。 |
| NullRequiredComplexProperty(Object, Object) |
複數型性質 '{type}.{property}' 設定為必需(不可空除),但儲存變更時為空值。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-complex-types 。 |
| NullRequiredPrimitiveCollection(Object, Object) |
原始集合性質 '{type}.{property}' 設定為必需(不可空除),但儲存變更時為空值。 要麼將該屬性標記為可選(可空),要麼設定非空值。 |
| ObjectRemovedFromModel(Object) |
物件 '{name}' 已從模型中移除。 |
| OptionsExtensionNotFound(Object) |
找不到類型為 '{optionsExtension}' 的期權擴充功能。 |
| OriginalValueNotStored(Object, Object) |
原始值不會儲存在屬性 '{structuralType} 的範圍內。{property}'。 |
| OriginalValueNotTracked(Object, Object) |
財產的原始價值 '{1_entityType}。{0_property}' 無法被存取,因為它沒有被追蹤。 當使用「變更且變更通知」策略時,大多數實體屬性的原始值不會被記錄。 要存取所有原始值,請使用不同的變更追蹤策略,例如「ChangingAndChangedNotificationsWithOriginalValues」。 |
| OwnedDerivedType(Object) |
擁有實體類型 '{entityType}' 不能有基礎類型。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-owned 。 |
| OwnerlessOwnedType(Object) |
實體類型 '{ownedType}' 已被標記為擁有,必須透過導航從其他實體類型引用。 在指向「{ownedType}」的實體類型中新增導覽,或者不要設定為擁有。 |
| OwnershipNotCascadeDelete(Object, Object, Object, Object) |
從「{principalEntityType}」到 '{dependentEntityType}' 的所有權關係設定為「{deleteBehavior}' 刪除行為。 所有權關係必須使用 '{cascadeBehavior}' 刪除行為。 要麼移除明確的刪除行為設定,要麼不要將此關係設定為擁有權。 |
| OwnershipNotRequired(Object, Object) |
從「{principalEntityType}」到 '{dependentEntityType}' 的所有權關係被設定為可選。 必須建立所有權關係。 要麼移除可選設定,要麼不要將此關係設定為擁有權。 |
| OwnershipToDependent(Object, Object, Object) |
導覽 '{navigation}' 無法更改,因為 '{principalEntityType}' 與 '{dependentEntityType}' 之間的外鍵是一個所有權。 若要將導航改為擁有實體類型,請移除所有權。 |
| ParameterExpressionMustHaveName(Object) |
參數表達式 '{parameterExpression}' 必須有名稱。 |
| PoolingContextCtorError(Object) |
型別為「{contextType}」的 DbContext 無法被池化,因為它沒有接受單一參數的公開建構子,也沒有多個建構子。 |
| PrimaryKeyAttributeOnDerivedEntity(Object, Object) |
衍生型別 '{derivedType}' 不能有 [PrimaryKey] 屬性,因為主鍵只能在根型上宣告。 將屬性移到 '{rootType}'',或透過 [NotMapped] 屬性或在 'OnModelCreating' 的基底類型中呼叫「EntityTypeBuilder.Ignore' 來移除 '{rootType}'。 |
| PrimaryKeyDefinedOnIgnoredProperty(Object, Object) |
實體類型 '{entityType}' 上的 [PrimaryKey] 屬性無效,因為屬性 '{propertyName}' 被 [NotMapped] 屬性標記為未映射,或在 'OnModelCreating' 中標記為「Ignore()」。 主鍵無法使用未映射的屬性。 |
| PrimaryKeyDefinedOnNonExistentProperty(Object, Object, Object) |
實體類型 '{entityType}' 上的 [PrimaryKey] 屬性參考了屬性 {properties},但該實體類型或其任何基礎類型中都不存在名為 '{propertyName}' 的屬性。 |
| PrincipalEndIncompatibleNavigations(Object, Object, Object) |
在建立「{navigationSpecification1}' 與 '{navigationSpecification2}' 之間的關係時,無法將實體類型 '{targetEntityType}' 設為主體。 |
| PrincipalEntityTypeNotInRelationship(Object, Object, Object) |
你正在設定 '{dependentEntityType}' 和 '{principalEntityType}' 之間的關係,但你在 '{entityType}'' 上指定了一個主鍵。 外金鑰必須針對關係中屬於的類型。 |
| PrincipalKeylessType(Object, Object, Object) |
無鍵實體類型 '{entityType}' 不能位於 '{firstNavigationSpecification}' 與 '{secondNavigationSpecification}' 關係的主要端。 主要實體類型必須有金鑰。 欲了解更多無鑰匙實體類型的資訊,請參見 https://go.microsoft.com/fwlink/?linkid=2141943。 |
| PrincipalOwnedType(Object, Object, Object) |
從「{referencingEntityTypeOrNavigation}」到 '{referencedEntityTypeOrNavigation}' 之間的關係不被支援,因為擁有實體類型 '{ownedType}' 不能位於非擁有權關係的主體端。 移除該關係或將外鍵設定為「{ownedType}'。 |
| PropertyCalledOnNavigation(Object, Object) |
'{property}' 不能作為實體類型 '{entityType}' 的屬性,因為它是設定為導覽。 |
| PropertyClashingNonIndexer(Object, Object) |
索引器屬性 '{property}' 無法加入 '{type}' 型別,因為 CLR 型別包含同名成員。 指定不同名稱或將「{property}」設為非索引器屬性。 |
| PropertyConceptualNull(Object, Object) |
性質 '{1_entityType}。{0_property}' 包含 null,但該屬性被標記為必須。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看關鍵值。 |
| PropertyConceptualNullSensitive(Object, Object, Object) |
屬性 '{property}' 在實體 '{entityType}' 上包含 null,鍵值為 '{keyValue}'',但該屬性被標記為必需。 |
| PropertyDoesNotBelong(Object, Object, Object) |
屬性 '{property}' 屬於類型 '{expectedType}'',但實際上用於型別為 '{actualType}'' 的實例。 |
| PropertyInUseForeignKey(Object, Object, Object, Object) |
屬性 '{property}' 無法從類型 '{type}' 中移除,因為它被用於 '{foreignKeyType}'' 的外鍵 {foreignKeyType}' 中。 所有包含外鍵的外鍵必須先移除或重新定義,才能移除該屬性。 |
| PropertyInUseIndex(Object, Object, Object, Object) |
屬性 '{property}' 無法從類型 '{entityType}'' 中移除,因為它被用於 '{indexType}' 的索引中。 所有包含索引的索引必須先移除或重新定義,才能移除該屬性。 |
| PropertyInUseKey(Object, Object, Object) |
屬性 '{property}' 無法從 '{entityType}' 型別中移除,因為它被用於鍵 {keyProperties} 中。 所有包含的鍵必須先移除或重新定義,才能移除該屬性。 |
| PropertyIsNavigation(Object, Object, Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 是透過 '{propertyMethod}'' 方法存取,但在模型中定義為導覽。 請使用 '{referenceMethod}' 或 '{collectionMethod}' 方法來存取導覽。 |
| PropertyIsNotACollection(Object, Object) |
實體類型 '{entityType}' 上的屬性 '{propertyName}' 不是集合屬性,無法與索引集合存取器一起使用。 |
| PropertyNotAdded(Object, Object, Object) |
屬性為 '{entityType}。{property}' 無法映射,因為它屬於 '{propertyType}' 型別,這既不是支援的原始型態,也不是有效的實體型別。 你可以明確映射這個屬性,或是用 '[NotMapped]' 屬性忽略它,或是在 'OnModelCreating' 裡用 'EntityTypeBuilder.Ignore' 來忽略它。 |
| PropertyNotAddedAdHoc(Object, Object, Object) |
屬性為 '{entityType}。{property}' 無法映射,因為它屬於 '{propertyType}' 型別,這既不是支援的原始型態,也不是有效的實體型別。 可透過「[NotMapped]」屬性忽略此屬性。 |
| PropertyNotFound(Object, Object) |
性質 '{1_entityType}。{0_property}' 找不到。 確保該物業存在且已被納入模型中。 |
| PropertyNotMapped(Object, Object, Object) |
'{propertyType}' 屬性 '{entityType}。{property}' 無法映射,因為資料庫提供者不支援此類型。 考慮使用值轉換器將屬性值轉換成資料庫支援的類型。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-value-converters 。 或者,你可以使用 '[NotMapped]' 屬性或在 'OnModelCreating' 中使用「EntityTypeBuilder.Ignore' 來排除該屬性。 |
| PropertyReadOnlyAfterSave(Object, Object) |
性質 '{1_entityType}。{0_property}' 在儲存後定義為唯讀,但其值已被修改或標記為修改。 |
| PropertyReadOnlyBeforeSave(Object, Object) |
性質 '{1_entityType}。{0_property}' 在儲存前被定義為唯讀,但其值被設定為非暫存或預設值。 |
| PropertyWrongClrType(Object, Object, Object, Object) |
屬性 '{property}' 無法加入類型 '{type}',因為對應的 CLR 屬性或欄位 '{clrType}' 的類型與指定的類型 '{propertyType}'' 不符。 |
| PropertyWrongEntityClrType(Object, Object, Object) |
屬性 '{property}' 無法加入類型 '{type}',因為它是在 CLR 類型 '{clrType}' 上宣告的。 |
| PropertyWrongName(Object, Object, Object) |
屬性 '{property}' 無法加入 '{type}' 型別,因為它與所提供的 CLR 屬性或欄位 '{clrName}'' 的名稱不符。 請使用相同名稱或指定不同的CLR成員。 |
| PropertyWrongType(Object, Object, Object) |
屬性 '{property}' 無法從類型 '{type}' 中移除,因為它是在 '{otherType}'' 類型中宣告的。 |
| QueryEntityMaterializationConditionWrongShape(Object) |
實體類型為「{entityType}」的實體塑造器所通過的物質化條件並非正確的形狀。 物質化條件必須是「Func<ValueBuffer, IEntityType>」的「LambdaExpression」。 |
| QueryFailed(Object, Object) |
LINQ 表達式「{expression}」由「{visitor}」處理失敗。 這可能表示 Entity Framework 存在錯誤或限制。 詳情請參見 https://go.microsoft.com/fwlink/?linkid=2101433 。 |
| QueryInvalidMaterializationType(Object, Object) |
查詢包含一個型別為 '{queryableType}' 的投影 '{projection}'。 最終投影中的集合必須是「IEnumerable<T>」類型,例如「List<T>」。 考慮使用「ToList」或其他機制,將「IQueryable<T>」或「IOrderedEnumerable<T>」轉換成「IEnumerable<T>」。 |
| QueryRootDifferentEntityType(Object) |
替代的實體類型 {entityType} 與此查詢根所代表的實體類型名稱及 CLR 類型不同。 |
| QueryUnableToTranslateEFProperty(Object) |
「{expression}」的翻譯失敗。 要麼查詢來源不是實體類型,要麼指定的屬性不存在於該實體類型中。 |
| QueryUnableToTranslateMember(Object, Object) |
成員 '{member}' 在實體類型 '{entityType}' 的翻譯失敗。 這通常發生在指定的成員未映射時。 |
| QueryUnableToTranslateMethod(Object, Object) |
方法「{declaringTypeName}」的翻譯。{methodName}' 失敗。 如果這個方法能映射到你的自訂函式,請參考 https://go.microsoft.com/fwlink/?linkid=2132413 更多資訊。 |
| QueryUnhandledQueryRootExpression(Object) |
型別為 '{type}' 的查詢根節點並未被提供者代碼處理。 此問題發生在使用不同供應商專用方法且不支援的服務商時。 |
| ReadOnlyListType(Object) |
型別 '{givenType}' 無法用作原始集合,因為它是唯讀的。 不支援原始型別的唯讀集合。 |
| ReferencedShadowKey(Object, Object, Object, Object) |
從 '{referencingEntityTypeOrNavigation}' 到 '{referencedEntityTypeOrNavigation}' 的關係,帶有外鍵屬性 {foreignKeyPropertiesWithTypes} 的關係,無法針對主鍵 {primaryKeyPropertiesWithTypes},因為它不相容。 為此關係配置一個主鍵或一組相容型別的外鍵屬性。 |
| ReferenceIsCollection(Object, Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 是透過 '{referenceMethod}'' 方法存取,但在模型中定義為集合導覽。 請使用 '{collectionMethod}' 方法來存取收藏導航。 |
| ReferenceMustBeLoaded(Object, Object) |
導航「{1_entityType}。{0_navigation}' 不能將 'IsLoaded' 設為 false,因為被參考的實體是非空,因此被載入。 |
| RelationshipConceptualNull(Object, Object) |
實體類型 '{firstType}' 與 '{secondType}' 之間的關聯已被切斷,但該關係被標記為必要或隱含必要,因為外鍵不可空。 如果應該在切斷必要關聯性時刪除相依/子實體,請將關聯性設定為使用串聯刪除。 如果依賴關係被移至其他主體,請考慮設定「context」。ChangeTracker.DeleteOrphansTiming',更多資訊請參見 https://aka.ms/efcore-docs-changing-relationships 。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看關鍵值。 |
| RelationshipConceptualNullSensitive(Object, Object, Object) |
實體 '{firstType}' 與 '{secondType}' 與鍵值 '{secondKeyValue}' 之間的關聯已被切斷,但該關係被標記為必要或隱含必要,因為外鍵不可空。 如果應該在切斷必要關聯性時刪除相依/子實體,請將關聯性設定為使用串聯刪除。 如果依賴關係被移至其他主體,請考慮設定「context」。ChangeTracker.DeleteOrphansTiming',更多資訊請參見 https://aka.ms/efcore-docs-changing-relationships 。 |
| RelationshipCycle(Object, Object, Object) |
一個涉及屬性 '{entityType} 的關係循環。{property}' 被偵測到。 這會阻止 Entity Framework 判斷正確的配置。 檢視屬性及其對應的主要屬性所定義的外鍵,並移除其中一個或在其中一個屬性上明確指定「{configuration}」。 |
| RequiredSkipNavigation(Object, Object) |
'{entityType}.{navigation}' 無法依需求設定,因為它代表跳過式導航。 |
| RetryLimitExceeded(Object, Object) |
執行資料庫操作時,使用「{strategy}」執行資料庫操作時,已超過最大重試次數({retryLimit})。 請參見內部例外,了解最近一次失敗。 |
| SameParameterInstanceUsedInMultipleLambdas(Object) |
同一個參數實例,名為「{parameterName}」,在查詢樹的多個 lambda 中被使用。 每個 lambda 必須有自己的參數實例。 |
| SaveOwnedWithoutOwner(Object) |
無法儲存 '{entityType}' 的實例,因為它是擁有實體,且沒有任何擁有者參考。 擁有實體只能作為包含所有者實體的集合的一部分被保存。 |
| SeedDatumComplexProperty(Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為它設定了複雜的屬性 '{property}'。 目前播種不支援複雜屬性。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31254 。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看相關的屬性值。 |
| SeedDatumComplexPropertySensitive(Object, Object, Object) |
實體類型 '{entityType}' 的種子實體,鍵值為 '{keyValue}'' 無法新增,因為它設定了複雜的屬性 '{property}'。 目前播種不支援複雜屬性。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/31254 。 |
| SeedDatumDefaultValue(Object, Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為預設值已提供所需屬性 '{property}'。 請提供與「{defaultValue}」不同的值。 |
| SeedDatumDerivedType(Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為所提供的值屬於導出型別 '{derivedType}''。 將衍生的種子實體加入對應的實體類型。 |
| SeedDatumDuplicate(Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為 {keyProperties} 的另一個具有相同鍵值的種子實體已被新增。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看這些相互衝突的鍵值。 |
| SeedDatumDuplicateSensitive(Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為已新增另一個具有鍵值為「{keyValue}' 的種子實體。 |
| SeedDatumIncompatibleValue(Object, Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為屬性 '{property}' 的值與屬性類型 '{type}' 不相容。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看相關的房產價值。 |
| SeedDatumIncompatibleValueSensitive(Object, Object, Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為屬性 '{property}' 所提供的值 '{value}' 與屬性類型 '{type}' 不相容。 |
| SeedDatumMissingValue(Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為未提供所需屬性 '{property}' 的值。 |
| SeedDatumNavigation(Object, Object, Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為它已設定導覽「{navigation}'。 要建立關聯,請將實體種子加入 '{relatedEntityType}'',並指定外鍵值 {foreignKeyProperties}。 可以考慮使用 'DbContextOptionsBuilder.EnableSensitiveDataLogging' 來查看相關的屬性值。 |
| SeedDatumNavigationSensitive(Object, Object, Object, Object, Object) |
實體類型 '{entityType}' 的種子實體,鍵值為 '{keyValue}' 無法新增,因為它已設定導覽 '{navigation}''。 要建立關聯,請將實體種子加入 '{relatedEntityType}'',並指定外鍵值 {foreignKeyProperties}。 |
| SeedDatumSignedNumericValue(Object, Object) |
實體類型 '{entityType}' 的種子實體無法新增,因為屬性 '{property}' 需要非零值。 考慮提供負值以避免與非種子資料碰撞。 |
| SeedKeylessEntity(Object) |
無法新增實體類型 '{entityType}' 的種子實體,因為不支援無鍵實體類型。 考慮提供金鑰或移除種子資料。 |
| SelfReferencingNavigationWithInverseProperty(Object, Object, Object, Object) |
關係無法從性質 '{1_entityType} 建立。{0_property}' 映射到屬性 '{3_referencedEntityType}。{2_referencedProperty}'。 檢查 [InverseProperty] 屬性中的值,確保關係定義唯一,並從一個導覽參考到對應的反向導覽。 |
| SelfReferencingNavigationWithInverseProperty(Object, Object) |
導航 '{entityType} 的反函數。{property}' 不可能是同一個導航。 將 [InverseProperty] 屬性中的值改成不同的導覽。 |
| ServiceProviderConfigAdded(Object) |
新增 '{key}' 的設定 |
| ServiceProviderConfigChanged(Object) |
設定變更為 '{key}' |
| ServiceProviderConfigRemoved(Object) |
已移除 '{key}' 的設定 |
| ShadowEntity(Object) |
已淘汰.
實體類型 '{entityType}' 處於影子狀態。 一個有效的模型要求所有實體類型都有對應的 CLR 類型。 |
| ShadowManyToManyNavigation(Object, Object, Object, Object) |
無法在 '{leftEntityType} 之間建立多對多的關係。{leftNavigation}' 和 '{rightEntityType}。{rightNavigation}' 因為其中一個或兩個導覽沒有對應的 CLR 屬性。 考慮在實體 CLR 類型中加入對應的私有屬性。 |
| SharedTypeDerivedType(Object) |
共享型態實體類型 '{entityType}' 不能有基底型態。 |
| SingletonOptionChanged(Object, Object) |
曾呼叫 '{optionCall}',改變了服務提供者內必須為常數的選項,但 Entity Framework 並未建置自己的內部服務提供者。 要麼允許 Entity Framework 透過移除對 '{useInternalServiceProvider}'' 的呼叫來建構服務提供者,要嘛確保「{optionCall}' 的設定不會在所有傳遞給 '{useInternalServiceProvider}' 的服務提供者使用時改變。 |
| SingletonRequired(Object, Object) |
嘗試註冊一個實例,用於 '{scope}' 服務 '{service}'。 實例僅能註冊於「單例」服務。 |
| SkipInverseMismatchedForeignKey(Object, Object, Object, Object, Object) |
外鍵 {foreignKeyProperties} 無法用於跳過導覽 '{navigation}',因為它使用連接實體類型 '{joinType}'',而反向跳躍導覽 '{inverse}' 則是與使用連接實體類型 '{inverseJoinType}'' 的外鍵相關聯。 反向導覽必須使用相同的連接實體類型。 |
| SkipInverseMismatchedJoinType(Object, Object, Object, Object) |
跳過導覽「{inverse}」使用連接實體類型 '{inverseJoinType}' 時,無法設定為使用 join 實體類型 '{joinType}'' 的反向。 反向導覽必須使用相同的連接實體類型。 |
| SkipNavigationForeignKeyWrongDependentType(Object, Object, Object, Object) |
外鍵 {foreignKeyProperties} 無法用於跳過導覽 '{entityType}。{navigation}' 因為它在實體類型 '{dependentEntityType}'' 上宣告,但預期會在 '{entityType}'' 上使用外鍵。 |
| SkipNavigationForeignKeyWrongPrincipalType(Object, Object, Object, Object) |
外鍵 {foreignKeyProperties} 無法用於跳過導覽 '{entityType}。{navigation}' 因為它在實體類型 '{entityType}' 上宣告,但預期會有一個外鍵在 '{principalEntityType}'' 上。 |
| SkipNavigationInUseBySkipNavigation(Object, Object, Object, Object) |
跳過導覽 '{entityType}.{skipNavigation}' 無法移除,因為它設定為跳過導航 '{referencingEntityType} 的反向。{反向跳過導航}'。 所有引用的跳過導覽必須先移除,才能移除此跳過導覽。 |
| SkipNavigationInUseBySkipNavigation(Object, Object, Object) |
跳過導航的「{skipNavigation}」無法移除,因為它設定為跳過導航「{inverseSkipNavigation}' 在「{referencingEntityType}」上的反向。 所有引用的跳過導覽必須先移除,才能移除此跳過導覽。 |
| SkipNavigationNoForeignKey(Object, Object) |
跳過導覽 '{1_entityType}.{0_navigation}' 沒有外鍵相關聯。 每個跳過導覽必須有一個設定的外鍵。 |
| SkipNavigationNoInverse(Object, Object) |
跳過導覽 '{1_entityType}.{0_navigation}' 沒有設定反向導航。 每個跳過導覽都應該有反向跳過導引。 |
| SkipNavigationNonCollection(Object, Object) |
跳過導覽 '{1_entityType}.{0_navigation}' 不是集合。 目前僅支援收藏跳過導覽。 |
| SkipNavigationSelfInverse(Object, Object) |
跳過導覽的 '{navigation}' 在實體類型 '{entityType}' 上無法設定為獨立的反元。 |
| SkipNavigationWrongInverse(Object, Object, Object, Object) |
在實體類型 '{inverseEntityType}' 上宣告的跳過導覽「{inverse}」無法設定為針對「{targetEntityType}'' 的「{navigation}' 的反向。 反向導航應在目標實體類型上宣告。 |
| SkipNavigationWrongType(Object, Object, Object) |
跳過導覽的「{navigation}」無法從實體類型「{entityType}''中移除,因為它定義在實體類型「{otherEntityType}'上。 |
| StoreGenValue(Object, Object) |
性質 '{1_entityType}。{0_property}' 無法被資料庫賦予一個值。 儲存產生的值只能指派給設定為使用儲存產生值的屬性。 |
| TempValue(Object, Object) |
性質 '{1_entityType}。{0_property}' 無法被賦予暫時值。 暫存值只能指派給設定為使用儲存產生值的屬性。 |
| TempValuePersists(Object, Object, Object) |
性質 '{1_entityType}。{0_property}' 在嘗試將實體狀態改為 '{state}'' 時,會有一個暫時值。 要麼明確設定永久值,要麼確保資料庫設定能產生此屬性的值。 |
| TrackingTypeMismatch(Object, Object) |
實體類型 '{runtimeEntityType}' 的實例無法被追蹤為實體類型 '{entityType}',因為這兩種類型不在同一階層結構中。 |
| TranslationFailed(Object) |
LINQ 表達式「{expression}」無法被翻譯。 要麼將查詢重寫成可翻譯的形式,要麼透過插入呼叫 'AsEnumerable', 'AsAsyncEnumerable', 'ToList' 或 'ToListAsync' 來明確切換到用戶端評估。 如需相關資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=2101038 。 |
| TranslationFailedWithDetails(Object, Object) |
LINQ 表達式「{expression}」無法被翻譯。 補充資訊:{details} 要麼將查詢重寫成可翻譯的形式,要麼透過插入呼叫 'AsEnumerable', 'AsAsyncEnumerable', 'ToList' 或 'ToListAsync' 來明確切換到客戶端評估。 如需相關資訊,請參閱 https://go.microsoft.com/fwlink/?linkid=2101038 。 |
| TypeConfigurationConflict(Object, Object, Object, Object) |
類型 '{type}' 被設定為 '{typeConfiguration}'',這與類型 '{otherType}' 設定為 '{otherTypeConfiguration}'' 衝突。 所有基礎型態與實作介面必須擁有相同的組態型態。 |
| TypeNotMarkedAsShared(Object) |
模型中尚未設定為共享型別的「{type}」。 在呼叫「UsingEntity」之前,先在模型中將該實體類型加入為共享實體。 |
| UnableToDiscriminate(Object, Object) |
無法實現類型為 '{entityType}' 的實體實例。 沒有判別子能匹配判別子值 '{discriminator}''。 |
| UnableToSetIsUnique(Object, Object, Object) |
無法將 'IsUnique' 設定為與導航關聯的 '{isUnique}', '{2_entityType},{1_navigationName}' 因為導航的多數性相反。 |
| UnconfigurableType(Object, Object, Object, Object) |
類型 '{type}' 無法設定為「{configuration}',因為模型建構假設它設定為「{expectedConfiguration}'。 移除不支援的「{configurationType}」設定。 |
| UnconfigurableTypeMapping(Object) |
預設型別映射無法設定為 '{type}' 型別,因為它不是有效的純量型態。 移除不支援的設定。 |
| UnhandledExpressionNode(Object) |
Unhandled 表達式節點類型 '{nodeType}'. |
| UnhandledMemberBinding(Object) |
未處理成員綁定類型 '{bindingType}'. |
| UnhandledNavigationBase(Object) |
未處理型別的「INavigationBase」,類型為 '{type}'。 |
| UnionTypeNotSupported(Object) |
類型 '{type}' 無法映射,因為不支援聯集類型。 如需相關資訊,請參閱 https://github.com/dotnet/efcore/issues/36375 。 |
| UnknownEntity(Object) |
遇到未處理的{entity}。 |
| UnknownKeyValue(Object, Object) |
'{entityType} 的值。{property}' 在嘗試儲存變更時是未知的。 這是因為該屬性同時也是外金鑰的一部分,而該關係中的主要實體並未知。 |
| UnknownShadowKeyValue(Object, Object) |
影子金鑰屬性 '{entityType} 的值。{property}' 在嘗試儲存變更時是未知的。 這是因為當實體未被追蹤時,影子屬性的價值無法被保留。 考慮將該屬性加入實體的 .NET 類型。 如需相關資訊,請參閱 https://aka.ms/efcore-docs-owned-collections 。 |
| UnnamedIndexDefinedOnIgnoredProperty(Object, Object, Object) |
在實體類型 '{entityType}' 上透過 [Index] 屬性指定的無名索引,且屬性為 {indexProperties} 是無效的。 屬性 '{propertyName}' 被 [NotMapped] 屬性或 'Ignore()' 標記為未映射,該屬性在 'OnModelCreating' 中被標記為未映射。 索引不能使用未映射的屬性。 |
| UnnamedIndexDefinedOnNonExistentProperty(Object, Object, Object) |
透過實體類型 '{entityType}' 上的 [Index] 屬性指定的無名索引會參考 {indexProperties} 的屬性,但該實體類型或其任何基礎類型中不存在名為 '{propertyName}' 的屬性。 |
| UntrackedDependentEntity(Object, Object, Object) |
實體類型 '{entityType}' 使用共享類型,且所提供的實體目前未被追蹤。 要開始追蹤這個實體,請在擁有者條目上呼叫「{referenceCall}」或「{collectionCall}」。 |
| ValueCannotBeNull(Object, Object, Object) |
屬性的價值為 '{1_entityType}。{0_property}' 無法設為 null,因為它的型別是 '{propertyType}',而這不是可為空的型別。 |
| ValueGenWithConversion(Object, Object, Object) |
屬性 '{entityType} 不支援價值產生。{property}',因為它設定了一個「{converter}' 轉換器。 設定屬性不使用值產生,使用 'ValueGenerated.Never' 或 'DatabaseGeneratedOption.None' 來設定,改用明確的值。 |
| VisitIsNotAllowed(Object) |
不允許呼叫「{visitMethodName}」。 手動進入訪問者中相關部分的表達式。 |
| WarningAsErrorTemplate(Object, Object, Object) |
針對警告 '{eventName}': {message} 會產生錯誤:此例外可以透過將事件 ID '{eventId}' 傳給 'DbContext.OnConfiguring' 或 'AddDbContext' 中的 'ConfigureWarnings' 方法來抑制或記錄。 |
| WeakBaseType(Object, Object) |
已淘汰.
類型 '{entityType}' 不能以實體類型 '{baseType}' 作為基礎類型,因為後者有定義導覽。 |
| WeakDerivedType(Object) |
已淘汰.
實體類型 '{entityType}' 無法有基礎類型,因為它有定義導覽。 |
| WrongGenericPropertyType(Object, Object, Object, Object) |
性質 '{1_entityType}.{0_property}' 屬於型別 '{actualType}'',但所提供的一般型別是型別 '{genericType}''。 |
| WrongStateManager(Object) |
無法開始追蹤實體類型「{entityType}」的條目,因為它是由另一個 StateManager 實例建立的。 |