SYSK 396: FxCop Rules for RESTful API

There are a few well known basic naming rules providing a consistent, understandable REST API services, e.g. The scheme and host name are not case sensitive; however, the path and query should be treated as case sensitive. Lowercase letters are preferred in URI paths.  Do use hyphens (-) between words to improve readability of URI…

0

SYSK 395: DataAnnotations: ConditionallyRequiredAttribute with lamda expressions

Back in 2010, Jeff Hanley published a sample of a ConditionallyRequiredAttribute that used a name of another property for runtime condition verification.  The original source can be found at http://jeffhandley.com/archive/2010/09/26/RiaServicesCustomReusableValidators.aspx.  I took the liberty to update it to support lambda expressions, allowing for more complex rules, e.g. [ConditionallyRequired(typeof(YourClass), “(x) => { return x.Prop1 == 5…

0