public override int GetHashCode() { unchecked { const int randomPrime = 397; int hashCode = Id.GetHashCode(); hashCode = (hashCode * randomPrime) ^ (FullDocumentFileName != null ? FullDocumentFileName.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (FreeSnippetFileName != null ? FreeSnippetFileName.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (OriginalFileName != null ? OriginalFileName.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (Description != null ? Description.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (Degree != null ? Degree.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (CourseName != null ? CourseName.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (CourseCode != null ? CourseCode.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (Year != null ? Year.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ UniversityId.GetHashCode(); hashCode = (hashCode * randomPrime) ^ UploadedBy.GetHashCode(); hashCode = (hashCode * randomPrime) ^ UploadedAt.GetHashCode(); hashCode = (hashCode * randomPrime) ^ (DeletedAt != null ? DeletedAt.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ IsFree.GetHashCode(); hashCode = (hashCode * randomPrime) ^ (IsApproved != null ? IsApproved.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (Hash != null ? Hash.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ (MinHashSignature != null ? MinHashSignature.GetHashCode() : 0); hashCode = (hashCode * randomPrime) ^ CategoryId.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { int result = 1; result = (result * 397) ^ (Comment != null ? Comment.GetHashCode() : 0); result = (result * 397) ^ (Email != null ? Email.GetHashCode() : 0); result = (result * 397) ^ (FailedPasswordAttemptsCount != null ? FailedPasswordAttemptsCount.GetHashCode() : 0); result = (result * 397) ^ (FailedPasswordAttemptWindowStart != null ? FailedPasswordAttemptWindowStart.GetHashCode() : 0); result = (result * 397) ^ Id.GetHashCode(); result = (result * 397) ^ IsApproved.GetHashCode(); result = (result * 397) ^ IsFirstTimeUser.GetHashCode(); result = (result * 397) ^ IsLockedOut.GetHashCode(); result = (result * 397) ^ (LastActivityDate != null ? LastActivityDate.GetHashCode() : 0); result = (result * 397) ^ (LastLoginDate != null ? LastLoginDate.GetHashCode() : 0); result = (result * 397) ^ (LastPasswordChangeDate != null ? LastPasswordChangeDate.GetHashCode() : 0); result = (result * 397) ^ (Password != null ? Password.GetHashCode() : 0); result = (result * 397) ^ (PasswordKey != null ? PasswordKey.GetHashCode() : 0); result = (result * 397) ^ (Username != null ? Username.GetHashCode() : 0); result = (result * 397) ^ UserType.GetHashCode(); return(result); }