Get Rid of Exceptions in Your Code With the Result Pattern

Milan Jovanović
Milan Jovanović
50.1 هزار بار بازدید - 10 ماه پیش - Get the source code for
Get the source code for this video for FREE → the-dotnet-weekly.ck.page/result-pattern ☄️ Master the Modular Monolith Architecture: bit.ly/3SXlzSt 📌 Accelerate your Clean Architecture skills: bit.ly/3PupkOJ 🚀 Support me on Patreon to access the source code: www.patreon.com/milanjovanovic I will show you two approaches for Domain validation with .NET. The first approach will be based on throwing exceptions. The second approach will be based on returning a result object. I'll show you how to extend the Result pattern with errors and clean up your design. It's more performant and expressive than throwing exceptions. Which validation approach would you choose? I prefer expressing errors using the Result pattern. Join my weekly .NET newsletter: www.milanjovanovic.tech/ Read my Blog here: www.milanjovanovic.tech/blog Chapters 0:00 Why I don't prefer throwing exceptions 2:36 Returning error messages instead of throwing exceptions 3:31 Adding an Error type express errors in the domain 5:44 Documenting domain errors for a better design 7:48 Using a Result object to represent success or failu
10 ماه پیش در تاریخ 1402/08/19 منتشر شده است.
50,161 بـار بازدید شده
... بیشتر