0

I'm trying to use EF to link to a database on Visual Studio 2017.

What I did so far: New Project -> ASP.NET Web Application (C#) -> Add folders and core references to "Web Forms" and "MVC" and set authentication to "Individual User Accounts"

Right click the project -> Add -> ADO.NET Entity Data Model -> EF Designer from Database -> New Connection -> Server Name ".\SQLEXPRESS" -> Selected database name -> Finish

Following the generated comment in Designer.cs I changed the value of the 'Code Generation Strategy' designer property to 'Legacy ObjectContext', the comment was replaced with the code I need (according to the tutorial i'm using) and that's where the errors showed up all over.

Not sure if I should post any code as I haven't added any yet, everything is still the automatically generated code.

Jad Mrad
  • 53
  • 1
  • 7

1 Answers1

0

Solution for the problem I was facing earlier:

Add ".Entity.Core." to the three tags as shown:

using System.Data.Entity.Core.EntityClient;
using System.Data.Entity.Core.Objects;
using System.Data.Entity.Core.Objects.DataClasses;

Note: The tutorial and method are very much outdated and I found this very recent tutorial a better solution

Jad Mrad
  • 53
  • 1
  • 7