Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (Bonus == default(decimal) ? 0 : Bonus.GetHashCode());
         hash = hash * 23 + (BusinessEntityId == default(int) ? 0 : BusinessEntityId.GetHashCode());
         hash = hash * 23 + (CommissionPct == default(decimal) ? 0 : CommissionPct.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         hash = hash * 23 + (SalesLastYear == default(decimal) ? 0 : SalesLastYear.GetHashCode());
         hash = hash * 23 + (SalesQuota == null ? 0 : SalesQuota.GetHashCode());
         hash = hash * 23 + (SalesYtd == default(decimal) ? 0 : SalesYtd.GetHashCode());
         hash = hash * 23 + (TerritoryId == null ? 0 : TerritoryId.GetHashCode());
         return(hash);
     }
 }
Пример #2
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (CostLastYear == default(decimal) ? 0 : CostLastYear.GetHashCode());
         hash = hash * 23 + (CostYtd == default(decimal) ? 0 : CostYtd.GetHashCode());
         hash = hash * 23 + (CountryRegionCode == null ? 0 : CountryRegionCode.GetHashCode());
         hash = hash * 23 + (Group == null ? 0 : Group.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (Name == null ? 0 : Name.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         hash = hash * 23 + (SalesLastYear == default(decimal) ? 0 : SalesLastYear.GetHashCode());
         hash = hash * 23 + (SalesYtd == default(decimal) ? 0 : SalesYtd.GetHashCode());
         return(hash);
     }
 }