Hi, i have a a database with two tables(RegFee_tbl and User_tbl),my RegFee_tbl have this columns:
ID,NumberPhone,ExpTime,RegTime,Fee,Transaction.
and my User_tbl have this columns:
ID,NumberPhone,Name.
now i using this Query to joining table together:
var st = (from s in db.RegFee_Tbl
join o in db.User_Tbl on s.NumberPhone equals o.NumberPhone
where s.ExpTime < DateTime.Now
select new { s.ID, s.RegTime, s.NumberPhone, o.FatherName, o.Name, s.ExpTime, s.Transaction, s.Fee }).ToList();
and i passing this "st" var to my datagride Source and everything is fine,but i have a problem, i getting rows in datagrid with the same Name e.g:
row 1 : Alex|123| and another columns data ...
row 2 : Alex|321| and another columns data ...
i want just get the one row with the same name(the final writed row in database if it's possible)
What I have tried:
i using select TOP query and searching so much but i dont find solution :(