Entity Framework 6 Web Forms Guide?

.net, entity-framework, vb.net, webforms

Solution

I have some experience in dealing with legacy ASP .NET Web Forms apps and i can give you the following advices:

1) Create a new project that represents the bussiness layer, this is an interface that´s going to comunicate the presentation layer (Web forms) with the Data access Layer (Entity framework). Check Bussiness Access Layer

2) Create a new project that represents the data access layer. Inside the project create a model of EF using Database First approach. This tutorials will help you Entity Framework 4 and ASP .NET Web Forms and Entity Framework and ASP .NET Web Forms CRUD and this one (full code with explain) EF & Database First & Web Forms.

Every new method you migrate using this new aproach is going to the bussines layer so it doesnt affect the actual working project.

3) Create a new Unit Test project that tests every new method of the bussiness layer. I would suggest this tutorial Writing Unit Tests for the .NET Framework with the Microsoft Unit Test Framework for Managed Code

Keep in mind that this is approach will help you test the new and maintain the old working on!

Problem

I'm working to make a legacy VB.NET web forms application a little more modern. Rather than re-write the app in MVC, I'd rather keep the app in web forms, but overhaul the stringly typed database calls with a strongly typed Entity Framework model (or models). I can't find much information regarding Web Forms and EF6. Is there a good guide out there to help?

Original source