簡體   English   中英

c#引用錯誤-名稱空間'EntityFramework'中不存在類型或名稱空間名稱'Extended'

[英]c# referencing error - The type or namespace name 'Extended' does not exist in the namespace 'EntityFramework'

我從Visual Studio中的NuGet管理器導入了EntityFramework.Extended包,當我將其放入using指令時,出現以下錯誤。

The type or namespace name 'Extended' does not exist in the namespace 'EntityFramework' (are you missing an assembly reference?)

在此處輸入圖片說明在此處輸入圖片說明在此處輸入圖片說明在此處輸入圖片說明

如您所見,它在Visual Studio中被引用,在我的項目中using語句以及物理目錄存在錯誤,為什么會有這個問題...

編輯我擺脫了擴展,只是在做:

 using EntityFramework;

效果很好,但是當我在實體類上調用Delete方法時,它無法識別該方法? 它說沒有RosterSummaryData_Subject_Local_Bands類的Delete方法。 有什么幫助嗎?

在此處輸入圖片說明

我相信EntityFramework Extended的名稱空間只是EntityFramework 來自此處的源代碼示例: https : //github.com/loresoft/EntityFramework.Extended/blob/master/Source/EntityFramework.Extended/Container.cs

namespace EntityFramework
{
/// <summary>
/// The default <see cref="IContainer"/> for resolving dependencies.
/// </summary>
public class Container : IContainer
{

您可能正在尋找EntityFramework.Extensions命名空間。 從源代碼:

此類具有一些Delete方法: https : //github.com/loresoft/EntityFramework.Extended/blob/master/Source/EntityFramework.Extended/Extensions/BatchExtensions.cs

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM