public IEnumerable <ValidationError> Validate() { if (Id.IsNull() || Id == Guid.Empty) { yield return(new ValidationError { PropertyName = "Id", ErrorMessage = ValidationMessages.CannotBeNullOrEmpty }); } if (Name.IsMissing()) { yield return(new ValidationError { PropertyName = "Name", ErrorMessage = ValidationMessages.CannotBeNullOrEmpty }); } if (TeamId.IsNull() || TeamId == Guid.Empty) { yield return(new ValidationError { PropertyName = "TeamId", ErrorMessage = ValidationMessages.CannotBeNullOrEmpty }); } if (Version.IsNull() || Version.Length == 0) { yield return(new ValidationError { PropertyName = "Version", ErrorMessage = ValidationMessages.CannotBeNullOrEmpty }); } }
public IEnumerable <ValidationError> Validate() { if (TeamId.IsNull() || TeamId == Guid.Empty) { yield return(new ValidationError { PropertyName = "TeamId", ErrorMessage = ValidationMessages.CannotBeNullOrEmpty }); } }