I did a query which should return only 3 rows, but I get 36 rows with the rest being duplicates.
var query = from a in db.as
join b in db.bs on a.pri equals b.for
join c in db.cs on b.pri equals c.for
where b.Age == age
select new string[]
{
a.Name,
a.Gender,
b.Amount,
c.Location,
};
string[][] results = query.ToArray();
return results;
Could it be the .ToArray causing it to have multiple duplicates?
One quick solution is make use of Distinct method
which may resolve your problem.
if not please share the data of you table….