Book Image

Learning Microsoft Azure

By : Geoff Webber Cross, Geoff Webber-Cross
Book Image

Learning Microsoft Azure

By: Geoff Webber Cross, Geoff Webber-Cross

Overview of this book

Table of Contents (19 chapters)
Learning Microsoft Azure
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Completing the admin sales website


The administrator website isn't getting as much attention as the customer website as we don't need it to drive the case study. I'm going to use the Visual Studio scaffold view and controllers for each entity in our data model to save time, using the following procedure for each entity:

  1. Add a reference to our Model project as we did for the customer website.

  2. Right-click on the Controllers folder and go to Add | Controller.

  3. Select MVC 5 Controller with views, using Entity Framework from the options and click on Add:

  4. Enter Controller name and select the related entity from the Model class list:

  5. For the first one, I'm going to click on New data context.... I'm not going to modify the TenantDbContext class as it's unrelated to our sales data model (I changed the name from the default to AdminWebsite.Models.SalesContext).

  6. Next, click on Add, and Visual Studio will build a controller for you with a full set of views for performing basic CRUD operations.

  7. Do the same for...