diff --git a/OliverBooth/Data/Web/BlacklistEntry.cs b/OliverBooth/Data/Web/BlacklistEntry.cs index 374d9c2..2141557 100644 --- a/OliverBooth/Data/Web/BlacklistEntry.cs +++ b/OliverBooth/Data/Web/BlacklistEntry.cs @@ -45,8 +45,16 @@ internal sealed class BlacklistEntry : IEquatable, IBlacklistEnt /// public bool Equals(BlacklistEntry? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return EmailAddress.Equals(other.EmailAddress); } diff --git a/OliverBooth/Data/Web/ProgrammingLanguage.cs b/OliverBooth/Data/Web/ProgrammingLanguage.cs index 53746d9..1c4de45 100644 --- a/OliverBooth/Data/Web/ProgrammingLanguage.cs +++ b/OliverBooth/Data/Web/ProgrammingLanguage.cs @@ -42,8 +42,16 @@ internal sealed class ProgrammingLanguage : IEquatable, IPr /// public bool Equals(ProgrammingLanguage? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return Key.Equals(other.Key); } diff --git a/OliverBooth/Data/Web/Project.cs b/OliverBooth/Data/Web/Project.cs index 05761a7..32868de 100644 --- a/OliverBooth/Data/Web/Project.cs +++ b/OliverBooth/Data/Web/Project.cs @@ -74,8 +74,16 @@ internal sealed class Project : IEquatable, IProject /// public bool Equals(Project? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return Id.Equals(other.Id); } diff --git a/OliverBooth/Data/Web/SiteConfiguration.cs b/OliverBooth/Data/Web/SiteConfiguration.cs index b118f75..1bba964 100644 --- a/OliverBooth/Data/Web/SiteConfiguration.cs +++ b/OliverBooth/Data/Web/SiteConfiguration.cs @@ -50,8 +50,16 @@ public sealed class SiteConfiguration : IEquatable /// public bool Equals(SiteConfiguration? other) { - if (ReferenceEquals(null, other)) return false; - if (ReferenceEquals(this, other)) return true; + if (ReferenceEquals(null, other)) + { + return false; + } + + if (ReferenceEquals(this, other)) + { + return true; + } + return Key == other.Key; } diff --git a/OliverBooth/Data/Web/Template.cs b/OliverBooth/Data/Web/Template.cs index cf029a1..0ef5d90 100644 --- a/OliverBooth/Data/Web/Template.cs +++ b/OliverBooth/Data/Web/Template.cs @@ -47,8 +47,16 @@ public sealed class Template : ITemplate, IEquatable