- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
public class BasisTariffing : IFormattable
{
public override bool Equals(object obj) {
BasisTariffing subject = obj as BasisTariffing;
if (subject == null) {
return false;
}
return ((Profession == null && subject.Profession == null) || (Profession != null && subject.Profession != null && Profession.Equals(subject.Profession))) &&
((BasisRateOf == null && subject.BasisRateOf == null) || (BasisRateOf != null && subject.BasisRateOf != null && BasisRateOf.Equals(subject.BasisRateOf))) &&
((BasisRating1Main == null && subject.BasisRating1Main == null) || (BasisRating1Main != null && subject.BasisRating1Main != null && BasisRating1Main.Equals(subject.BasisRating1Main))) &&
((BasisRating1Add == null && subject.BasisRating1Add == null) || (BasisRating1Add != null && subject.BasisRating1Add != null && BasisRating1Add.Equals(subject.BasisRating1Add))) &&
((BasisRating2Main == null && subject.BasisRating2Main == null) || (BasisRating2Main != null && subject.BasisRating2Main != null && BasisRating2Main.Equals(subject.BasisRating2Main))) &&
((BasisRating2Add == null && subject.BasisRating2Add == null) || (BasisRating2Add != null && subject.BasisRating2Add != null && BasisRating2Add.Equals(subject.BasisRating2Add))) &&
((BasisRating3Main == null && subject.BasisRating3Main == null) || (BasisRating3Main != null && subject.BasisRating3Main != null && BasisRating3Main.Equals(subject.BasisRating3Main))) &&
((BasisRating3Add == null && subject.BasisRating3Add == null) || (BasisRating3Add != null && subject.BasisRating3Add != null && BasisRating3Add.Equals(subject.BasisRating3Add))) &&
((BasisRating4Main == null && subject.BasisRating4Main == null) || (BasisRating4Main != null && subject.BasisRating4Main != null && BasisRating4Main.Equals(subject.BasisRating4Main))) &&
((BasisRating4Add == null && subject.BasisRating4Add == null) || (BasisRating4Add != null && subject.BasisRating4Add != null && BasisRating4Add.Equals(subject.BasisRating4Add))) &&
((BasisRating5Main == null && subject.BasisRating5Main == null) || (BasisRating5Main != null && subject.BasisRating5Main != null && BasisRating5Main.Equals(subject.BasisRating5Main))) &&
((BasisRating5Add == null && subject.BasisRating5Add == null) || (BasisRating5Add != null && subject.BasisRating5Add != null && BasisRating5Add.Equals(subject.BasisRating5Add))) &&
((BasisRating6Main == null && subject.BasisRating6Main == null) || (BasisRating6Main != null && subject.BasisRating6Main != null && BasisRating6Main.Equals(subject.BasisRating6Main))) &&
((BasisRating6Add == null && subject.BasisRating6Add == null) || (BasisRating6Add != null && subject.BasisRating6Add != null && BasisRating6Add.Equals(subject.BasisRating6Add))) &&
((BasisRating7Main == null && subject.BasisRating7Main == null) || (BasisRating7Main != null && subject.BasisRating7Main != null && BasisRating7Main.Equals(subject.BasisRating7Main))) &&
((BasisRating7Add == null && subject.BasisRating7Add == null) || (BasisRating7Add != null && subject.BasisRating7Add != null && BasisRating7Add.Equals(subject.BasisRating7Add))) &&
((BasisRating8Main == null && subject.BasisRating8Main == null) || (BasisRating8Main != null && subject.BasisRating8Main != null && BasisRating8Main.Equals(subject.BasisRating8Main))) &&
((BasisRating8Add == null && subject.BasisRating8Add == null) || (BasisRating8Add != null && subject.BasisRating8Add != null && BasisRating8Add.Equals(subject.BasisRating8Add)));
}
public override int GetHashCode() {
return ((Profession != null) ? Profession.GetHashCode() : 0) ^
((BasisRateOf != null) ? BasisRateOf.GetHashCode() : 0) ^
((BasisRating1Main != null) ? BasisRating1Main.GetHashCode() : 0) ^
((BasisRating1Add != null) ? BasisRating1Add.GetHashCode() : 0) ^
((BasisRating2Main != null) ? BasisRating2Main.GetHashCode() : 0) ^
....................................
}
}
Как вам перегрузочка? И это только часть кода *сущности*, больше просто не вместилось =)
absolut 15.03.2011 11:35 # +3
bugmenot 15.03.2011 12:20 # +5
Lure Of Chaos 15.03.2011 19:09 # 0
rusco_developer 15.03.2011 12:24 # +1
absolut 15.03.2011 12:36 # 0
RaZeR 15.03.2011 16:09 # 0
da4ever 15.03.2011 16:47 # 0
RaZeR 15.03.2011 21:27 # 0
da4ever 16.03.2011 00:26 # 0
тяжелые запросы должно происходить только в цыкле!