Lesson 2: Overview of .NET Data Annotations and a Sample of Using Them in C#
This lesson provides a quick overview of what a Data Annotation is. Data Annotations inherit from the ValidationAttribute class and thus all have an ErrorMessage property. The ErrorMessage property can have placeholders to substitute different data without you hard-coding data.
Be sure to watch this lesson as it provides background for the rest of the course. It also introduces you to the basic code you need to write to validate data annotations in any application.
Content
Lesson Objectives 00:00
What is a Data Annotation 00:23
The ErrorMessage Property 01:32
ErrorMessage Property Placeholders 01:47
Localize the ErrorMessage Property 02:19
DEMO: A Data Annotation Sample 02:51
Lesson Summary 05:22
Useful Links
Samples and hands-on labs for this course: https://www.pdsa.com/YouTube
System.ComponentModel.DataAnnotations Namespace: 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: [email protected]
LinkedIn: / paulsheriff
Blog: https://blogs.pdsa.com/
Pluralsight: https://app.pluralsight.com/profile/a...
YouTube Channel: @pauldsheriff
Смотрите видео Lesson 2: Overview of .NET Data Annotations and a Sample of Using Them in C# онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Paul D. Sheriff 09 Февраль 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 292 раз и оно понравилось 12 людям.