Source Code: https://github.com/shady78/MasterCrudOp
My LinkedIn: / shady-khalifa-73a2b3280
In this video, we will learn how to Seed Initial Data into our PostgreSQL database using Entity Framework Core 10 in a .NET 10 Web API project.
Seeding is a very important technique used to automatically insert sample or default data into the database when the application starts. This is extremely useful in development and testing environments.
🔥 In this lesson, you will learn:
What is Database Seeding in EF Core
Why seeding is useful in real-world projects
How to use UseSeeding() and UseAsyncSeeding() (introduced in EF Core 9+)
How to insert sample data safely without duplication
How to check if data already exists before inserting
How to trigger seeding automatically on application startup
📌 We will implement seeding inside MovieDbContext and insert a sample movie record into the Movies table.
🚀 Technologies used in this series:
✅ ASP.NET Core Web API (.NET 10)
✅ EF Core 10
✅ PostgreSQL
✅ Docker
✅ Minimal APIs
✅ Domain Driven Design (DDD)
🔗 Useful Links:
EF Core Seeding Docs: https://learn.microsoft.com/en-us/ef/...
PostgreSQL: https://www.postgresql.org/
.NET SDK: https://dotnet.microsoft.com/en-us/do...
💬 If you have any questions about EF Core Seeding, drop them in the comments!
#dotnet #efcore #postgresql #seeding #csharp #aspnetcore #webapi #docker