SharedValidator.RuleFor(c=>c.Name).Must((v,c)=>!_providerFactory.All().Any(p=>p.Name==c&&p.Id!=v.Id)).WithMessage("Should be unique");
SharedValidator.RuleFor(c=>c.Name).Must((v,c)=>!_providerFactory.All().Any(p=>p.Name.EqualsIgnoreCase(c)&&p.Id!=v.Id)).WithMessage("Should be unique");