I am using Entity Framework to generate classes and functions in C # I need to interact with SQL server.
For reference, here is one of my tables:
SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Area]( [ID] [bigint] identity (1, 1) primary key, [Name] [nvarchar](100) NOT NULL ) GO
After starting the Entity Data Model Wizard (using "EF Designer from database"), my project has an edmx file and some new .cs files, but it seems that it does not generate everything that it needs.
In my DatabaseEntities class, for example, I have:
public virtual DbSet<Area> Areas { get; set; }
However, there is no definition for the type 'Area' (along with three other missing types). I also miss the functions of stored procedures.
I tried to delete new files and re-run the Model Wizard, but I get the same result.
Anyone else come across this?
SIDENOTES:
I noticed that during the last few attempts I also get an error message when starting the wizard: "Entity Framework package is not installed in the project." However, it still generates edmx and model.context when I click on it.
I had the same issue with both versions 6.0.0 and 6.1.2 for Entity Framework.
Reinstalling the framework did not affect the problem.
UPDATE:
Removing nuget and reinstalling the latest version allowed me to install EntityFramework via nuget without errors. However, the ADO.NET data model is now missing from the Add New Item dialog box.