Exemplo n.º 1
0
 public IEnumerable <string> GetErrosToCreate()
 {
     if (string.IsNullOrEmpty(FirstName) || FirstName.All(char.IsWhiteSpace))
     {
         yield return("First Name cannot be empty.");
     }
     if (string.IsNullOrEmpty(LastName) || LastName.All(char.IsWhiteSpace))
     {
         yield return("Last Name cannot be empty.");
     }
     if (string.IsNullOrEmpty(Document) || Document.All(char.IsWhiteSpace))
     {
         yield return("Document cannot be empty.");
     }
 }