public static void ValidateMaximum(string parameterName, string value, int maximumLength) { if (value != null) { RepositoryHelper.CheckMaximumLength(parameterName, value.Trim(), maximumLength); } }
public static void ValidateBounds(string parameterName, string value, int minimumLength, int maximumLength) { if (value != null) { string temp = value.Trim(); RepositoryHelper.CheckMinimumLength(parameterName, temp, minimumLength); RepositoryHelper.CheckMaximumLength(parameterName, temp, maximumLength); } }