Guest User

Untitled

a guest
Jun 19th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. public IEnumerable<RuleViolation> GetRuleViolations()
  2. {
  3. if (String.IsNullOrEmpty(Name))
  4. yield return new RuleViolation("Name is Required", "Name");
  5. if (String.IsNullOrEmpty(Date.ToString()))
  6. yield return new RuleViolation("Date is Required", "Date");
  7. yield break;
  8. }
Add Comment
Please, Sign In to add comment