Entity Framework Windows 应用程序
Entity Framework Windows App
我有带有以下代码的 EF 应用程序。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WinFormswithEFSample
{
public class ObservableListSource<T> : ObservableCollection<T>, IListSource
where T : class
{
private IBindingList _bindingList;
bool IListSource.ContainsListCollection { get { return false; } }
IList IListSource.GetList()
{
return _bindingList ?? (_bindingList = this.ToBindingList());
}
}
}
但是在构建项目时出现附加错误。这段代码有什么错误?
尝试添加位于 EntityFramework.dll
库中的命名空间 System.Data.Entity
(此程序集是必要的)。
我有带有以下代码的 EF 应用程序。
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WinFormswithEFSample
{
public class ObservableListSource<T> : ObservableCollection<T>, IListSource
where T : class
{
private IBindingList _bindingList;
bool IListSource.ContainsListCollection { get { return false; } }
IList IListSource.GetList()
{
return _bindingList ?? (_bindingList = this.ToBindingList());
}
}
}
但是在构建项目时出现附加错误。这段代码有什么错误?
尝试添加位于 EntityFramework.dll
库中的命名空间 System.Data.Entity
(此程序集是必要的)。