var employees = new List<employee>(); var fulltimeemployees= db.Table<fulltimeemp>().Where(fl => siteId == null || fl.SiteId == siteId).Select(e => e.EmployeeId); employees = db.Table<employee>().Where(e => fulltimeemployees.Contains(e.Id) || e.IsDefault).ToList(); return employees ;
employees = db.Table<employee>().Where(e => fulltimeemployees.Where(x=>x.EmployeeId==e.Id).Any() || e.IsDefault).ToList();
x.EmployeeId
'Guid' does not contain a definition for 'EmployeeId' and no accessible extension method 'EmployeeId' accepting a first argument of type 'Guid' could be found (are you missing a using directive or an assembly reference?)
db.Table
join
var result = (from fte in fulltimeemployees join emp in db.Table<Employee>().Where(e=> e.IsDefault==false) on fte.id equals emp.id into grp from item in grp.DefaultIfEmpty() select new { fte.id, //other details here ... }) .ToList();
employees = db.Table<employee>() .Where(e => fulltimeemployees.Any(fe=> fe.EmployeeId ==e.Id) || e.IsDefault) .ToList();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)