I have a query below that works but was wondering if there is a cleaner way to implement it.
var query = Context.Alerts
.Where(a => a.AlertsDismisseds.Where(d => d.AlertID == a.AlertID)
.Count() == 0)
.Select(a => a);
I am looking to select all the Alerts from a table if there are not in the AlertsDismisseds table.
Thanks in advance.
1 Answer