linq get values is not in other table

58

linq get values is not in other table -

var result=(from e in db.Users
            select e.UserID).Except(from m in db.Fi
                                    select m.UserID).ToList();

linq get values is not in other table -

var list = (from user in db.Users
                where !db.Fi.Any(f => f.UserID == user.UserID)
                select user.UserName).ToList()

Comments

Submit
0 Comments