O'Reilly logo

Fluent Entity Framework by Rebecca M. Riordan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validation annotations

We discussed using data annotations in Chapter 7 when we explored the Code First workflow. At that time I said these are just a special set of .NET attributes. What I didn’t say then was that some annotations also trigger validation.

Any annotation that descends from the ValidationAttribute class in the System.ComponentModel.DataAnnotations namespace will be included in the validation pipeline. There are eight in .NET 4.5, seven in .NET 4.0. (Compare is the new one.)

Image

Image Put On Your Thinking Hat

Ready to give it a shot? You ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required