question

PeterB-7093 avatar image
0 Votes"
PeterB-7093 asked DanielZhang-MSFT answered

Using Entity Framework

I am using entity framework with a wpf project. EF is installed, but when I click to add new item, I cannot add EF into the project. The add option doesn't appear. I want to generate a logical entity directly from the database. I used to be able to do this. Now I can't.
Visual Studio 2019 Community Edition

dotnet-entity-framework
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @PeterB-7093,
>> The add option doesn't appear.
First, right click your project and choose Properties.
And make sure that the project's target framework is .NET Framework.
Then add Entity Data Model by right clicking on the project in the solution explorer -> Add -> New Item.
This will open the Add New Item popup. In the popup, select ADO.NET Entity Data Model and provide an appropriate name to the EDM (Entity Data Mode) and click the Add button.
Is it here that the add you mean does not appear?
if not, please explain in detail.
Best Regards,
Daniel Zhang


0 Votes 0 ·
PeterB-7093 avatar image PeterB-7093 DanielZhang-MSFT ·

The problem is:
select ADO.NET Entity Data Model
Does not show up as a choice when I choose add new item.

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered

Hi PeterB-7093,
Please follow the steps below to check if the component "Entity Framework 6 tools" has been installed?
1.Go to Tools -> Get Tools and features
2.Select Individual components tab and check Entity Framework 6 tools under SDK's, libraries, and framework section.
82590-330.png
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



330.png (19.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.