Your technology certification is waiting. Enroll in Cloud Class ®
// See comment below
var ec = new OrderEqualityComparer();
// In the query you need to add the Distinct method after the first ToArray.
var mydata = db.data
.Where(T => T.some.Any(F => F.my_id == another_id))
.Select(T => new MyInfo
TId = T.tid,
PData = T.data
// This class is used to match two data object from the database table
// data to see if they are considered duplicates.
class OrderEqualityComparer : IEqualityComparer<data>
public bool Equals(data d1, data d2)
if (d1.TID == d2.TID & d1.OtherCoulmn == d2.OtherCoulmn)
public int GetHashCode(data d)
int hCode = d.TID.GetHashCode() ^ d.OtherCoulmn.GetHashCode();
Open in new window
The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.
One of a set of tools we're offering as a way of saying thank you for being a part of the community.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.