public override bool Equals(object obj) { var other = obj as Post; if (other == null) { return(false); } return(PostId.Equals(other.PostId)); }
public bool Equals(TrendingEntryCommunityCreation input) { if (input == null) { return(false); } return (( Media == input.Media || (Media != null && Media.Equals(input.Media)) ) && ( Title == input.Title || (Title != null && Title.Equals(input.Title)) ) && ( Author == input.Author || (Author != null && Author.Equals(input.Author)) ) && ( AuthorMembershipId == input.AuthorMembershipId || (AuthorMembershipId.Equals(input.AuthorMembershipId)) ) && ( PostId == input.PostId || (PostId.Equals(input.PostId)) ) && ( Body == input.Body || (Body != null && Body.Equals(input.Body)) ) && ( Upvotes == input.Upvotes || (Upvotes.Equals(input.Upvotes)) )); }
/// <summary> /// Relational equality checking if related guid exists in relation. /// This works because Guids are unique regardless of entity type. /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { return(PostId.Equals(obj) || CategoryId.Equals(obj)); }