Skip to content

Instantly share code, notes, and snippets.

@aGiftKit
Created August 3, 2014 13:58
Show Gist options
  • Save aGiftKit/62d9863383dba166f1b6 to your computer and use it in GitHub Desktop.
Save aGiftKit/62d9863383dba166f1b6 to your computer and use it in GitHub Desktop.
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