Sesame
Sesame

Reputation: 3410

Winforms Entity Framework

I am attempting to follow a tutorial regarding Winforms and Entity Framework, but am having difficulty following along.

The tutorial I am using is from CodeProject.com and can be found here. The problem I have is that the tutorial references two controls, EntityDataSource and EntityBindingNavigator, which I cannot find in my toolbox.

enter image description here

I have tried to right-click on my toolbox and clicked "Choose Items...", but I still cannot find these two controls. Although EntityDataSource is selected in the following image, it does not appear in my toolbox (perhaps because it's from the System.Web assembly?):

enter image description here

I have chosen the references I would assume I need, but it does not help the situation:

enter image description here

I am using Visual Studio 2012 Update 4. The tutorial is from Feb 2014, so I can't imagine I cannot find these controls because the tutorial is using an extremely old version of VS or something along those lines.

I am completely lost, especially because the tutorial has so many good ratings; apparently, it's just me who can't find these dang controls! I have found other posts from users who cannot find them, but the solution is usually to right-click the toolbox and click "Choose items..." (which I have done, to no avail).

Any other suggestions? Your help is greatly appreciated!

Upvotes: 5

Views: 1539

Answers (1)

Tim
Tim

Reputation: 28530

According to the sidebar in the link, the CodeProject article is about "A component that makes it easy to use Entity Framework in WinForms projects, including design-time binding support."

The article itself (I didn't read it in detail) appears to be more about how to use the component, not directly about using Entity Framework in WinForms. The article author has created a library (EFWinForms), and it is included in the downloads. For example, I downloaded the EF6 C# code, which has two projects and one solution - an EF6WinForms project and Sample project.

To follow along with the example, or use the EFWinForms library in your own project, you can add the project (from the download) to your solution and reference it, and then add the appropriate using (Imports for VB.NET) statements.

If you want to add just the DLL pick then build the EFWinForms project (it'll probably have a slightly different name depending on the version), and then add a reference to that DLL.

Upvotes: 5

Related Questions