Maybe a silly question, but I'm wondering why, when using SqlConnectionStringBuilder, I would ever want to make .AsynchronousProcessing false. I'm sure it's my inexperience, but I can't figure out what the purpose of not allowing a con开发者_如何学运维nection created with a particular connection string to be ran on a separate thread would be. When would I want to actively prevent this from happening?
Setting Async=true in the connection string gives a small performance penalty (e.g. when opening a SqlConnection) because for the SqlConnection to be able to execute commands async then it must have been created using Windows Async I/O, which has a little overhead compared to Windows Sync I/O.
精彩评论