Suzi167
February 26th, 2009, 03:53 PM
Hello,
I need to write a LINQ expression to remove all the entries from my VqEmSampleSchedules table which have their VqEmTestByLocationId == to the id I have passed to that function.
I have all my mappings working and I have entities with the same names as the tables.
I have the following expression which is not compiling:
EnvironmentalMonitoringModelUnitOfWork uow = new EnvironmentalMonitoringModelUnitOfWork();
uow.Remove(uow.VqEmSampleSchedules.Select( s => s.VqEmTestByLocationId=id));
I am new to LINQ and to lambdas so any help is very appreciated.
Thanks
Susan
I need to write a LINQ expression to remove all the entries from my VqEmSampleSchedules table which have their VqEmTestByLocationId == to the id I have passed to that function.
I have all my mappings working and I have entities with the same names as the tables.
I have the following expression which is not compiling:
EnvironmentalMonitoringModelUnitOfWork uow = new EnvironmentalMonitoringModelUnitOfWork();
uow.Remove(uow.VqEmSampleSchedules.Select( s => s.VqEmTestByLocationId=id));
I am new to LINQ and to lambdas so any help is very appreciated.
Thanks
Susan