c# - How to use FirstOrDefault for two primary keys -


there 2 primary key , b 1 key can compiled how 2 keys

var product = db.tmp_hello.firstordefault<tmp_hello>(instrmnt => (instrmnt.a == good.a; instrmnt.b == good.b)); 

use && operator in lambda.

var product = db.tmp_hello         .firstordefault<tmp_hello>(             instrmnt => instrmnt.a == good.a && instrmnt.b == good.b); 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -