Search code examples
activerecordlambdasubsonic

subsonic ActiveRecord: Lambda Parameter not in scope


I am trying to delete a list of albums from an Album table. Below is the syntax I am using, but it fails saying Lambda Parameter not in scope:

Album.Delete(x => (ListOfIds).Contains(x.Id));

What am I missing here?


Solution

  • The Contains method isn't currently supported in SubSonic's linq implementation. I've posted an alternative method of doing this in response to your other question here