C# 实体框架Windows应用程序

C# 实体框架Windows应用程序,c#,entity-framework,c#-4.0,C#,Entity Framework,C# 4.0,我有以下代码的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 WinFormswithEFSa

我有以下代码的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此程序集是必需的