asp.net-mvcCRUD operation


Introduction

CRUD Operation refers to classic (create, read, update, delete) operations as it pertains to data.

In ASP MVC context there are several ways to CRUD your data using Models and subsequently views, Controllers.

One simple way is to make use of the scaffolding feature provided by the Visual studio templates and customize to your needs.

Please keep in mind that CRUD is very broadly defined and it has many variations to suit your requirements. For e.g. Database first, Entity first etc.

Remarks

For simplicity sake, this CRUD operation uses a entity framework context in the controller. It is not a good practice, but it is beyond this topic's scope. Click in entity framework if you want to learn more about it.