Lesson 3: Validating Data Annotations Programmatically in C#

Publié le: 09 février 2024
sur la chaîne: Paul D. Sheriff
1,074
22

Lesson 3: Validating Data Annotations Programmatically in C#

In this lesson you build a console application to show you can do data validation in any C# application. You build a reusable helper class to perform validation on a class with data annotations.

Content
Lesson Objectives 00:00
DEMO: Create a Console Application Using Visual Studio 2022 00:19
DEMO: Create a Console Application Using VS Code 01:12
Classes for Generic Validation 02:33
The ValidationResult Class 03:10
DEMO: Create a Validation Helper Class 03:49
DEMO: Add and Validate a Product Class 05:39
The [Required] Attribute 08:04
DEMO: Using the [Required] Attribute 08:32
Other Useful Return Values 09:17
DEMO: Add Other Methods to the Validation Helper Class 10:27
Lesson Summary 12:57

Useful Links
Samples and hands-on labs for this course: https://www.pdsa.com/YouTube
The ValidationAttribute class: https://learn.microsoft.com/en-us/dot...
Minimal Web API Development course: http://tinyurl.com/4skvhxah
The [Required] Attribute: https://learn.microsoft.com/en-us/dot...
The ErrorMessage Property: https://learn.microsoft.com/en-us/dot...

#dataannotation #validation #csharp #development #programming #dotnet #dotnetcore #dotnet6 #dotnet #dotnet8 #pauldsheriff #pluralsight #youtube

Paul.About()
Hello, my name is Paul D. Sheriff and I have a passion for teaching. I have been training developers for over 35 years through books, videos, article, blog posts, and international conferences and user groups.

Paul.Contact()
Website: https://www.pdsa.com
Email: psheriff@pdsa.com
LinkedIn:   / paulsheriff  
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff


Sur cette page du site, vous pouvez voir la vidéo en ligne Lesson 3: Validating Data Annotations Programmatically in C# durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Paul D. Sheriff 09 février 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,074 fois et il a aimé 22 téléspectateurs. Bon visionnage!