Scaffold from Entity Designer

In this tutorial, we'll generate a model, controller and views from this Entity Design:

Right click on the diagram, select "Add Code Generation item":

This will generate these .tt and .cs files under Member.edmx store (in Solution Explorer):

In the Package Manager Console, enter:

PM> Scaffold controller MembersController –force –DBContextType "ModelContainer"
Scaffolding MembersController...
Added database context 'Models\ModelContainer.cs'
Added 'Members' to database context 'BookBuyersGuideMVC.Models.ModelContainer'
Added controller Controllers\MembersController.cs
Added Create view at 'Views\Members\Create.cshtml'
Added Edit view at 'Views\Members\Edit.cshtml'
Added Delete view at 'Views\Members\Delete.cshtml'
Added Details view at 'Views\Members\Details.cshtml'
Added Index view at 'Views\Members\Index.cshtml'
Added _CreateOrEdit view at 'Views\Members\_CreateOrEdit.cshtml'