Entity Framework Core SQLite Setup and Implementation

preview_player
Показать описание
This tutorial and demo project will show how to set up, configure, and test a simple minimal web api with Microsoft Entity Framework Core SQLite database implementation.

In this video, you will learn how to use Entity Framework Core with SQLite as the database provider for your web API project. You will see how to:

- Install the necessary packages for Entity Framework Core and SQLite.
- Configure the connection string and the database context in the Program file.
- Generate and apply migrations to create the database schema and the Pizzas database file.
- Test the web API to perform CRUD operations on the SQLite database using Swagger UI

By the end of this video, you will have a working web API that can store and retrieve data from a SQLite database using Entity Framework Core.

If you enjoyed this video, please like, share, and subscribe to our channel. Also, don't forget to check out our other videos on Entity Framework Core and web API development. Thank you for watching and have a great day! 😊

GitHub Project Repo

Project Series

Script
We will set up our project to use Entity Framework Core with SQLite for the database implementation. First, install the packages. Next, update the Program file with the connection string and add SQLite to the web application builder services.
Let's start with a fresh rebuild of our solution.
The first step is to install the entity framework tools.
Next, we generate migration and initial creation files.
Let's take a look at the newly created files.
Apply migrations. You should see a newly created Pizzas database file in your project directory. If you are having issues, first try a rebuild and then re-run the above commands.
Start the application and post a new pizza to be stored in the database.
Stop the application. Then start it back up.
Get all pizzas and verify the database successfully stored and retrieved our pizza.
Рекомендации по теме
Комментарии
Автор

Rapido y directo al punto, muchas gracias

alanalvarez
welcome to shbcf.ru