public override int GetHashCode() { unchecked { var hashCode = _rightsExpire.GetHashCode(); hashCode = (hashCode * 397) ^ IsGeoBlocked.GetHashCode(); hashCode = (hashCode * 397) ^ AvailableFromUtc.GetHashCode(); hashCode = (hashCode * 397) ^ AvailableToUtc.GetHashCode(); hashCode = (hashCode * 397) ^ (int)AccessibilityType; return(hashCode); } }
public bool Equals(UsageRight other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(_rightsExpire == other._rightsExpire && IsGeoBlocked == other.IsGeoBlocked && AvailableFromUtc.Equals(other.AvailableFromUtc) && AvailableToUtc.Equals(other.AvailableToUtc) && AccessibilityType == other.AccessibilityType); }
/// <summary> /// Model must be validated! /// </summary> public BusinessEntities.Bikes.Bike ToEntity() { return(new BusinessEntities.Bikes.Bike( BikeId.GetValueOrDefault(), BikeState.Value, BikeModel.ToEntityPartial(), Color, CurrentLocation, CurrentLocationName, AvailableFromUtc.GetValueOrDefault(), RateAverage.GetValueOrDefault(), Created.Value, CreatedBy.ToEntityPartial(), null, ImageSeq, true )); }