views:

22

answers:

0

Hi there.
I read many articles and posts about data annotations. But most of them just simple 'How to use the xxx attribute' articles. But what i did not find is any article on which annotations should be used and why or why not.

I mean, its clear that its good to use things like StringLength, Range or Required attributes and it's clear what they do. But what is with attributes like Assocation, DataType or others? I can't think of a pratical use of them.

Which annotations do you use? How do you validate them in a windows application? I only found examples using asp validation.

Thanks for help.