filmov
tv
Entity Framework Core In-Memory Database Setup and Implementation
Показать описание
This tutorial and demo project will show how to set up, configure, and test a simple minimal web api with Microsoft Entity Framework Core in-memory database implementation.
In this video, you will learn how to use the Microsoft Entity Framework Core In-Memory package to create a web API that works with an in-memory database. This can be useful for testing or prototyping purposes, as the in-memory database does not persist any data after the app is stopped. You will see how to:
- Install the Microsoft Entity Framework Core In-Memory package for your project.
- Configure the web application builder services to add a database context with options to use the in-memory database.
- Run the web API and perform CRUD operations on the in-memory database using Swagger.
- Verify that the data in the in-memory database is lost when the app is restarted.
By the end of this video, you will have a better understanding of how to use the in-memory database provider with Entity Framework Core and how it differs from other database providers. You will also learn some of the benefits and limitations of using the in-memory database for your web API development.
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
-----------------------
The first step is to make sure that the Microsoft Entity Framework Core In-Memory package is installed for the project.
Next, we specify in the Program that the web application builder services should add a database context with options to use the in-memory database.
Let's start our application and demo the web api working with the in-memory database implementation.
First, we execute the Get Http Operation to see no existing records.
Next, we will post and create a new pizza to add to our in-memory database.
We verify that the pizza was added to the in-memory database.
Now stop the application, then start it back up.
As expected our pizza no longer exists because the in-memory database implementation only retains data while the app is running.
In this video, you will learn how to use the Microsoft Entity Framework Core In-Memory package to create a web API that works with an in-memory database. This can be useful for testing or prototyping purposes, as the in-memory database does not persist any data after the app is stopped. You will see how to:
- Install the Microsoft Entity Framework Core In-Memory package for your project.
- Configure the web application builder services to add a database context with options to use the in-memory database.
- Run the web API and perform CRUD operations on the in-memory database using Swagger.
- Verify that the data in the in-memory database is lost when the app is restarted.
By the end of this video, you will have a better understanding of how to use the in-memory database provider with Entity Framework Core and how it differs from other database providers. You will also learn some of the benefits and limitations of using the in-memory database for your web API development.
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
-----------------------
The first step is to make sure that the Microsoft Entity Framework Core In-Memory package is installed for the project.
Next, we specify in the Program that the web application builder services should add a database context with options to use the in-memory database.
Let's start our application and demo the web api working with the in-memory database implementation.
First, we execute the Get Http Operation to see no existing records.
Next, we will post and create a new pizza to add to our in-memory database.
We verify that the pizza was added to the in-memory database.
Now stop the application, then start it back up.
As expected our pizza no longer exists because the in-memory database implementation only retains data while the app is running.
Комментарии