.NET Core Tutorials – Razor Pages – Scaffold the movie model


You can download the project code here

With Visual Studio you can scaffold the model. The scaffolding tool build pages for CRUD operations (Create, Read, Update, and Delete).

  1. Right click on “Pages” folder > Add > New folder (name it “Movies”)
  2. Right click on the Pages/Movies folder > Add > New Scaffolded Item
  3. In the “Add Scaffold” dialog, select “Razor Pages using Entity Framework (CRUD)” > Add.11.png

4. Complete “Add Razor Pages using Entity Framework (CRUD)” dialog:

5. Model class: select “Movie”
6. Data context class: select the “+”  sign and accept the generated name “MoviesManager.Models.MoviesManagerContext”
7. Select Add.

12

After this the scaffold process create and update:

appsetting.json with database settings

Startup.cs

Files created inside “Movies” folder: Create, Delete, Edit, Details and index

13.png

You can download the project code here

Goto Next Step “.NET Core Tutorials – Razor Pages – Initial data migration”

Goto Topic Index

This content is property of Matias Creimerman.
Any misuse of this material will be punishable.
Creative Commons License
This work is licensed under a
Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

About the author:

Matías Creimerman
Matías Creimerman

Profesional Website

Linkedin

Blog

Medium

Youracclaim Badges

Microsoft Tech Profile

Aboutme

Connection

Portfoliobox

Github

ASP.NET Forum

Facebook

Twitter

Youtube

Crunchbase

Matías Creimerman Certifications

Matias Creimerman

 

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s