c# - Good way to select multiple rows with non-scalar list of keys using Entity Framework 4 -


I am using EF4 and I am trying to find a good way to select those records where The primary key uses multiple columns and using a list of items to search Here is no luck with what I have taken here:

I have a list of the type of Foo type . Fu has two properties, A and B The primary key on the order table is A and B columns.

  var order = (In the context of O.O. order where FooList.Contains (select new Foo {A = OA, B = OB});   

It throws an error that I can only use one scalar value, which I can tell, I will need a full list of scalers. I have also tried to join my object list, but he Either has not worked either:

  var order = (in context from O.Foo.A, foo.B) select new {oA, oB} Obviously, I can only repeat through all the values ​​in the FuList, I should get the order that I want and update it, but this is my current status (FooList). In about 6000 values).  

Any ideas?

You should still be able to use (a version) that was required before EF4.

As a result the SQL will be the same.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -