Entity Framework Core SQLite Setup and Implementation

Published: 13 January 2024
on channel: Kathleen West
136
1

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
https://github.com/kathleenwest/Pizza...

Project Series
   • Entity Framework Core with both SQLit...  

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.


On this page of the site you can watch the video online Entity Framework Core SQLite Setup and Implementation with a duration of hours minute second in good quality, which was uploaded by the user Kathleen West 13 January 2024, share the link with friends and acquaintances, this video has already been watched 136 times on youtube and it was liked by 1 viewers. Enjoy your viewing!