How can we fine tune the command object when we are expecting a single row

Q

How can we fine tune the command object when we are expecting a single row ?

✍: Guest

A

Again CommandBehaviour enumeration provides two values SingleResult and SingleRow. If you are expecting a single value then pass “CommandBehaviour.SingleResult” and the query is optimized accordingly, if you are expecting single row then pass “CommandBehaviour.SingleRow” and query is optimized according to single row.

2007-10-24, 5085👍, 0💬