- 15
- 8 710
Poorna Soysa
United States
Приєднався 2 чер 2019
Hi there, I'm Poorna Soysa 👋 Welcome to my UA-cam channel!
I'm passionate about .NET, C#, and all things software! This channel is where I share my knowledge with you. I create videos on software engineering, software architecture, Azure, and AWS, along with other cool software topics I discover.
I'm passionate about .NET, C#, and all things software! This channel is where I share my knowledge with you. I create videos on software engineering, software architecture, Azure, and AWS, along with other cool software topics I discover.
The Options Pattern Validation with Data Annotations in .NET 9 | ASP.NET Core Tutorial
In this ASP.NET Core tutorial, you'll learn how to implement Options Pattern Validation using Data Annotations in .NET 9. The Options Pattern allows for strongly typed configuration binding, but ensuring that these configurations are valid is crucial to avoid errors at runtime. In this video, we’ll walk through how to add validation to your IOptions using Data Annotations and ValidateOnStart, ensuring your application settings are correct right from the start.
📚 Learn More:
➤ Master the Options Pattern in .NET 9 with Dependency Injection | ASP.NET Core Tutorial - ua-cam.com/video/IGnTWoX4YLY/v-deo.html
➤ .NET 9 - Implementing Repository Pattern with Minimal API & SQLite | Entity Framework Core Tutorial: ua-cam.com/video/bOJLgzU4M74/v-deo.html
➤ .NET 9 - Generic Repository Pattern with Minimal API in ASP.NET Core | Entity Framework Core: ua-cam.com/video/EvD8BU9HHWc/v-deo.html
Connect with me 👋:
► GITHUB: www.github.com/poorna-soysa
► LINKEDIN: www.linkedin.com/in/poorna-soysa/
► TWITTER: TechPoorna/
👉 Support my work:
www.buymeacoffee.com/poorna.soysa
Don't Forget to:
👍 Like this video if you found it helpful
🔔 Subscribe for more coding tutorials
💬 Comment if you have any questions or suggestions
Chapters:
0:00 Intro
0:40 Recap
2:10 Adding Validation with Data Annotations
2:30 Configuring Options Pattern for Validation
3:30 Implementing ValidateOnStart()
4:20 Adding Custom Validation in Validate(
#dotnet #optionspattern #aspnetcore #webapi #dotnetcore #dotnet9 #minimalapi #csharp #csharptutorial #aspnetcore #validation #optionspatternvalidation
📚 Learn More:
➤ Master the Options Pattern in .NET 9 with Dependency Injection | ASP.NET Core Tutorial - ua-cam.com/video/IGnTWoX4YLY/v-deo.html
➤ .NET 9 - Implementing Repository Pattern with Minimal API & SQLite | Entity Framework Core Tutorial: ua-cam.com/video/bOJLgzU4M74/v-deo.html
➤ .NET 9 - Generic Repository Pattern with Minimal API in ASP.NET Core | Entity Framework Core: ua-cam.com/video/EvD8BU9HHWc/v-deo.html
Connect with me 👋:
► GITHUB: www.github.com/poorna-soysa
► LINKEDIN: www.linkedin.com/in/poorna-soysa/
► TWITTER: TechPoorna/
👉 Support my work:
www.buymeacoffee.com/poorna.soysa
Don't Forget to:
👍 Like this video if you found it helpful
🔔 Subscribe for more coding tutorials
💬 Comment if you have any questions or suggestions
Chapters:
0:00 Intro
0:40 Recap
2:10 Adding Validation with Data Annotations
2:30 Configuring Options Pattern for Validation
3:30 Implementing ValidateOnStart()
4:20 Adding Custom Validation in Validate(
#dotnet #optionspattern #aspnetcore #webapi #dotnetcore #dotnet9 #minimalapi #csharp #csharptutorial #aspnetcore #validation #optionspatternvalidation
Переглядів: 5
Відео
Master the Options Pattern in .NET 9 with Dependency Injection | ASP.NET Core Tutorial
Переглядів 44220 годин тому
Unlock the full potential of configuration management in your .NET 9 and ASP.NET Core applications with the Options Pattern! In this video, I'll guide you through everything you need to know about implementing the Options Pattern, from setting up appSettings.json to creating strongly-typed configuration classes and leveraging dependency injection for clean, scalable code. 📚 Learn More: ➤ .NET 9...
.NET 9 - Generic Repository Pattern with Minimal API in ASP.NET Core | Entity Framework Core
Переглядів 1,3 тис.День тому
🚀 𝗚𝗲𝗻𝗲𝗿𝗶𝗰 𝗥𝗲𝗽𝗼𝘀𝗶𝘁𝗼𝗿𝘆 𝗣𝗮𝘁𝘁𝗲𝗿𝗻 𝗶𝗻 .𝗡𝗘𝗧 𝟵 𝘄𝗶𝘁𝗵 𝗠𝗶𝗻𝗶𝗺𝗮𝗹 𝗔𝗣𝗜 Learn how to implement the Generic Repository Pattern using Minimal API in ASP.NET Core. This tutorial demonstrates building clean, reusable code and managing database operations efficiently with Entity Framework Core(EF Core). 🛠️ Technologies and Tools: 🔹.NET 9 🔹ASP.NET Core Minimal API 🔹Entity Framework Core (EF Core) 🔹SQLite 🔹Postman 📚 ...
.NET 9 - Implementing Repository Pattern with Minimal API & SQLite | Entity Framework Core Tutorial
Переглядів 2,7 тис.14 днів тому
In this video, we're tackling the Repository Pattern in .NET 9 with a Minimal API and Entity Framework Core, all powered by a SQLite database. What You'll Learn: 🔹What is the Repository Pattern and why it's important 🔹Setting up a Minimal API in .NET 9 🔹Using Entity Framework Core (EF Core) with SQLite 🔹Implementing the Repository Pattern for clean and maintainable code 🔹Step-by-step coding wal...
Build a REST API From Scratch in .NET 8 and EF Core | Beginners Tutorial
Переглядів 1,1 тис.21 день тому
Learn how to build a REST API in .NET 8 from scratch in this step-by-step tutorial! Perfect for beginners, this video covers creating a Todo app with full CRUD functionality (Create, Read, Update, Delete) using .NET 8 and Entity Framework Core. You'll set up a project, define models, configure a database, and implement API endpoints. Whether you're new to .NET or looking to polish your API deve...
Great demonstration, thanks for effort. What would be a good use case scenario for the IOptionsSnapshot and IOptionsMonitor interfaces?
This pattern has been spread like a virus between inexperienced developer who actually doesn't have an overview on the whole concept of development 🙄🙄🙄 Bro, there is no need to use a Repository pattern when you're working with Entity Framework. DbContext is a UnitOfWork, and DbSet is a Repository. Your Repository is doing absolutely nothing. It's just a Wrapper that repeate/uses the exact methods of Entity Framework. It also makes your Testing worst, because many developers go and Mock the Repository, which means many problems that happen on database relations will never be noticed.
Hey Pooran, i recently encountered a problem in .net core where i need to perform a put operation on a main model and CRUD on its sub model, I was not able to achieve this at a same time as this was making a conflict between the entity tracking system, finally i added the ignore in the mapping, Do have more accurate way to achieve that thing? I will really appreciate your effort 😊😊
Hi, Can you explain more with sample code?
Great demo! Would you add an extra layer between Repositories and Endpoints? Maybe a Services layer that maps from and to DTOs: Endpoints/ < --- DTOs --- > Services/ < --- Entities --- > Repositories/
Yes, I will implement the DTOs in the next video and show how the mapping logic works.
@@PoornaSoysaTech Great! Thank you
The repository can work this way with aggregates, but when using ORM entities, you can accidentally save other entities as well. Save should be on the UoW - once that is fixed, we'd talk about whether these interfaces and generic impl. do make sense (in some more complex scenarios, yes, but not for CRUD)...
Valid point! In my upcoming videos, I'll be covering how to implement the UoW pattern. This is part of a video series where I'm building and explaining things step by step. Thanks.
Nice!
Thanks 👍
👏🏽👏🏽👏🏽
Thanks 👍
WATCH NEXT VIDEO: Implementing Repository Pattern with Minimal API & SQLite | Entity Framework Core ua-cam.com/video/bOJLgzU4M74/v-deo.html
Incredible content, congratulations.
Thank you! 🙏
Would you maybe use Services to separate the logic from the Controller? If so, I’ve always been curious as of what work will be left for the controller to handle, I’ve never really grasped on those concepts and the separation of concerns between a controller and a service
Yes, services are used to separate business logic from controllers, keeping controllers lightweight.
More videos on dotnet core and please use your original voice. Thank you
I am planning to do more videos and thanks for your suggestion.
r u that poorna from linked in ?
Yes👍
Great Tutorial. I have a little question , what is the purpose of using AsNoTracking() with IEnumerable , GetAll List ?
Normally, tracking behavior determines whether Entity Framework Core maintains information about an entity instance in its change tracker. When an entity is tracked, any changes made to it are detected and saved to the database during a call to SaveChanges. No-tracking queries are ideal for read-only scenarios. They typically execute faster since they do not involve setting up change tracking information. That why I used AsNoTracking() for GetAll method.
When we are not performing any operation on the data and get the data for only reading purpose from SQL.
great explanation can you make a video on the EF in deep advance details please
Thanks for your feedback. Sure, I will make an EF Core video soon.👍
Really well done but this is about 20% of what you needed to teach., for the next set of videos you could cover: Relationships, Error Trapping, Tokens, Circuit Breakers, Retiries, Timeouts, Logging and finally Aspire as Swagger was so 3 years ago.
Sure. Thanks for your feedback. More videos are working.
Please keep creating more videos on .net asp.
Thanks! More .NET videos are definitely in the works.
Brave start. Subscribed and I’m following this course. ❤
Thanks
Gran trabajo 👌
Thanks
Great Work . Thank you.!
You're welcome.
Redundant null checks are now redundant and hidden
Depending on size, id use a look up table. Depends what my goal was
Thanks for your thoughts.!