Im trying to write query in linq
Select UserId, UserNumber
FROM User
where UserNumber in
(Select UserNumber
FROM User
group by UserNumber
having Count(UserId) = 1)
Aby hints ?
var query = from u in User
group u by u.UserNumber into usergroup
where usergroup.Count() == 1
from item in usergroup
select new { item.UserId,item.UserNumber };
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With