Let’s create a Get Details page with our first custom Model, View, and Controller. We are going to add new Controller ContactController and its GetContact action method will display the details of specified contact. We are going to use ASP.NET Core MVC Application from our previous discussion, Getting Started With ASP.NET Core 1.0 MVC. We have not discussed database connectivity yet. So, we are going to use a data mockup Model through static Contact List.

Create Data Model Project

Create Business Logic Project

Add Reference to WebApplicationCore.NetCore.BusinessLogic in WebApplicationCore.NetCore

Add Contact Controller

Add Contact GetContact View

Run Application in Debug Mode

Sample Source Code

I have placed the sample code for this session in "CRUD operations in ASP.NET Core 1.0 MVC Application Part 1_Code.zip" in CodePlex repository.