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

Folder list php -

GO: Serve static pages -

python - Why can't I destroy my StaticText in wxPython? -