I have in my database the table t_command_control
.
This table has a composite primary key formed by the CD_STATION
and CD_COMMAND
fields.
If the primary key was simple (just as CD_STATION
field) I would use the expression below to select the record I need.
Entities db = new Entities();
t_command_control objCommandControl = db.t_command_control.FirstOrDefault(e => e.CD_STATION == itCdStation);
But being the composite primary key I do not know how to select.