🐛 Replace Equals with SequenceEqual for a collection #200

Merged
alexis.drai merged 1 commits from apply-fixes-following-interview into main 3 years ago

@ -69,7 +69,7 @@ namespace Model.Dice
public Task<DiceGroup> Update(DiceGroup before, DiceGroup after) public Task<DiceGroup> Update(DiceGroup before, DiceGroup after)
{ {
// pas autorisé de changer les dés, juste le nom // pas autorisé de changer les dés, juste le nom
if (!before.Dice.Equals(after.Dice)) if (!before.Dice.SequenceEqual(after.Dice))
{ {
throw new ArgumentException("the group of dice cannot be updated, only the name", nameof(before)); throw new ArgumentException("the group of dice cannot be updated, only the name", nameof(before));
} }

Loading…
Cancel
Save