private void ValidateUniqueness(PluginProfileDto pluginProfile, PluginProfileErrorCollection errors) { if ( ProfileCollection.Any( x => string.Equals(x.Name.Value, pluginProfile.Name, StringComparison.InvariantCultureIgnoreCase))) { errors.Add(new PluginProfileError { FieldName = "Name", Message = "Profile name should be unique for plugin" }); } }