Book Image

ASP.NET Core Essentials

By : Shahed Chowdhuri
Book Image

ASP.NET Core Essentials

By: Shahed Chowdhuri

Overview of this book

<p>ASP.NET Core is the latest collection of Microsoft’s web application development technologies. When you’re trying to reach a broad spectrum of users with a robust web application, ASP.NET Core is there to help you build that application. With the ability to cater to users on desktop, tablet, or smartphone platforms, you can put together a solution that works well anywhere.</p> <p>This book is what you need to get started developing ASP.NET Core applications was quickly as possible; starting by introducing the software and how it can be used in today’s modern world of web applications and smartphone apps. Walking you through the benefits of a Web API to support both applications and mobile apps to give you a solid understanding of the tech to build upon as you see what ASP.NET Core can do for you.</p> <p>The book wraps up with practical guidelines for the use of database technologies, unit tests, security best practices, and cloud deployments for the real world.</p>
Table of Contents (15 chapters)
ASP.NET Core Essentials
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Implementing views


Views in MVC make up the presentation layer, the user interface that holds on-screen elements for the user to interact with. The UI in any web application can get busy really quickly, either filled with too many items at the same time, or burdened with business logic and unnecessary code. The goal of MVC's separation of concerns aims to help developers create well-architected applications where the views are lightweight and validation is performed in the model layer, which is connected to the view with binding.

Basic views

Similar to how we added a basic controller, we will create a basic view and gradually add code to it. Just as you can create a more complete controller with scaffolding, you can also create a more complete view attached to a template and model. But once again, we'll cover that later in this chapter.

First, let's create a subfolder for views that will be used by our Patient controller, so that we can add our new view to it. Follow the these steps:

  1. In Solution...