c# - Linq query syntax difference using SingleorDefault -


This question can not be very relevant, it is more of curiosity than anything else

< Code> option 1 var avariable = session.Query & lt; Someclass & gt; () .SingleOrDefault (x = & gt)

Is there any real advantage that in case of option 1 speed is on option 2? ; X.something == someotherThing); Option 2 var avariable = session.Query & lt; Someclass & gt; (). Where (x => x.something == someotherThing) SingleOrDefault ();

Thanks in advance

Option 1 to type fast

(They should make the same SQL, so the result in the same display, option 1 is only more compressed)


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

ios - Subclassing UIView and adding a property -

Powerbuilder 12.1 and DataWindow in Design vs Debug and Executable/Runtime -