Skip to content

Instantly share code, notes, and snippets.

@aGiftKit
Created Aug 3, 2014
Embed
What would you like to do?
Create Dto
public class TestPerson : DtoBase, IValidatableObject
{
public string Title { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string Initials { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
//if (Id == 0)
//{
// CustomValidationErrors++;
// yield return new ValidationResult("Should have used a PUT");
//}
return Enumerable.Empty<ValidationResult>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment