Many people have several problems when work with entitySets in lightswitch. EntitySet are objects that implements IDataServiceQueryable instead IQueryable so it doesnt have access to many linq extension methods.
Two of these are ToList() and Count().
But it implements IExecutable which get us access to Execute() method that return an IEnumerable<> of this EntitySet. The Execute() method executes a query over the EntitySet.
Simply, use the Execute method as below code:
In this case ToList() is not necessary because the Execute() method returns a IEnumerable.
I hope this can help!.