예제 #1
0
        public bool Equals(TestModel other)
        {
            var sizes = true;

            if (Sizes != null && other.Sizes != null)
            {
                if (Sizes.Count == other.Sizes.Count)
                {
                    if (Sizes.Where((t, i) => !t.Equals(other.Sizes[i])).Any())
                    {
                        sizes = false;
                    }
                }
            }

            return(Id == other.Id && Name == other.Name && Age == other.Age && NotNullable.GetValueOrDefault() == other.NotNullable.GetValueOrDefault() && Nullable == other.Nullable && Weight == other.Weight && BoolValue == other.BoolValue && Gender == other.Gender && NullableGender == other.NullableGender &&
                   Created == other.Created && ((Country == null && other.Country == null) || Country.Equals(other.Country)) && sizes);
        }
예제 #2
0
 public bool Equals(Size other)
 {
     return(Id == other.Id && Name == other.Name && Alias == other.Alias && NotNullable.GetValueOrDefault() == other.NotNullable.GetValueOrDefault() && Nullable == other.Nullable && SortOrder == other.SortOrder && BoolValue == other.BoolValue);
 }