diff --git a/OliverBooth/Data/Blog/BlogPost.cs b/OliverBooth/Data/Blog/BlogPost.cs index baa4bda..97f4cbb 100644 --- a/OliverBooth/Data/Blog/BlogPost.cs +++ b/OliverBooth/Data/Blog/BlogPost.cs @@ -1,4 +1,4 @@ -using SmartFormat; +using SmartFormat; namespace OliverBooth.Data.Blog; @@ -91,6 +91,29 @@ public sealed class BlogPost : IEquatable /// The legacy WordPress ID. public int? WordPressId { get; set; } + /// + /// Returns a value indicating whether two instances of are equal. + /// + /// The first instance of to compare. + /// The second instance of to compare. + /// + /// if and are equal; otherwise, + /// . + /// + public static bool operator ==(BlogPost? left, BlogPost? right) => Equals(left, right); + + /// + /// Returns a value indicating whether two instances of are not equal. + /// + /// The first instance of to compare. + /// The second instance of to compare. + /// + /// if and are not equal; otherwise, + /// . + /// + public static bool operator !=(BlogPost? left, BlogPost? right) => !(left == right); + + /// /// Returns a value indicating whether this instance of is equal to another instance. ///