https://github.com/timothyjan/razorpagesmovie
Movie Database using Razor Pages web app with ASP.NET Core
https://github.com/timothyjan/razorpagesmovie
Last synced: 8 months ago
JSON representation
Movie Database using Razor Pages web app with ASP.NET Core
- Host: GitHub
- URL: https://github.com/timothyjan/razorpagesmovie
- Owner: TimothyJan
- Created: 2024-07-30T16:35:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T18:17:01.000Z (almost 2 years ago)
- Last Synced: 2025-03-26T04:29:55.357Z (about 1 year ago)
- Language: C#
- Size: 21 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RazorPagesMovie
Movie Database using Razor Pages web app with ASP.NET Core
Tutorial: Create a Razor Pages web app with ASP.NET Core link
Entity Framework Core (EF Core)
- The app's model classes use Entity Framework Core (EF Core) to work with the database.
- EF Core is an object-relational mapper (O/RM) that simplifies data access.
- You write the model classes first, and EF Core creates the database.
Scaffold the movie model
- After creating the data model by adding the necessary properties to the class.
- The scaffolding tool produces pages for Create, Read, Update, and Delete (CRUD) operations for the model.
The migrations feature in Entity Framework Core provides a way to:
- Create the initial database schema.
- Incrementally update the database schema to keep it in sync with the app's data model. Existing data in the database is preserved.
- Tools > NuGet Package Manager > Package Manager Console.
~Add-Migration NewDataModelFieldand~Update-Database