In Dapper, what is the difference between the usage of QueryFirstOrDefault<T>
and ExecuteScalar<T>
?
Both seem to return a single value, although QueryFirstOrDefault<T>
will return a default value for the type, if none is found. Should you always prefer the use of one of the two, due to performance, or other reasons, or are they equivalent, disregarding the default value returned?