protected void ValidateNameUniqueness(PluginProfileErrorCollection errors, MashupManagerProfile profile)
{
if (errors.Any())
return;
var existsSuchName = profile != null && profile.MashupNames
.Any(
m => m.Equals(Name, StringComparison.InvariantCultureIgnoreCase));
if (existsSuchName)
{
errors.Add(new PluginProfileError
{
FieldName = NameField,
Message = "Mashup with the same name already exists"
});
}
}