I have User Table and each user can have multiple Computers... Lets say I am Ram, I can have only one DomainId
, multiple UserId
and multiple Computers..
I would like to get the DeviceId
of all my computers and those should be only Laptops not Desktops
I am getting all the computers details of a given user
var res = (from b in DB.Users
WHERE b.DomainId == 'MS\\aram'
select new {b.UserId, b.DeviceId}).ToList();
From the above deivces I want to get only those devices which are laptops... The device Id should be present in laptops table
My tblLaptops
table is having a column called DeviceId
.. I tried in the below query but it is throwing error cannot convert int into anonymous type
var devices = (from a in LBDB.tblLaptops where res.contains(a.DeviceId)
select new {a.UserId, a.DeviceId }).ToList();
once the above is returned I also want to get Display Name
of users which is in Extended Users table
Regarding the DisplayName, the column name is DisplayName and the table Name is ExtendedUser .. The ExtenderUserDevice table has DeviceId column which can be used to compare and the DisplayName of the device...