public IEnumerable <string> Validate() { if (string.IsNullOrEmpty(Id) || string.IsNullOrWhiteSpace(Id)) { yield return(IdCantBeNull.ToString()); } if (Genders.IsEmpty()) { yield return(OneGenderRequired.ToString()); } if (Units.IsEmpty()) { yield return(OneUnitRequired.ToString()); } }