摘要:
Use anonymous type for LINQ based lists instead of var 问题 I've LINQ requests that return anonymous types like: var result = context.Table1.Select( x = 阅读全文
摘要:
Determine what is blocking UI thread 问题 I am working on a rather large .NET WPF real-time application. The application is working great and as expecte 阅读全文
摘要:
What does SynchronizationContext do? 问题 In the book Programming C#, it has some sample code about SynchronizationContext: SynchronizationContext origi 阅读全文
摘要:
When should I use ConfigureAwait(true)? 问题 Has anyone come across a scenario for using ConfigureAwait(true)? Since true is the default option I cannot 阅读全文
摘要:
Questions About T-SQL Transaction Isolation Levels You Were Too Shy to Ask Every time you access a relational database to make a query, you have an im 阅读全文
摘要:
SQL Server table hints – WITH (NOLOCK) best practices SQL Server table hints are a special type of explicit command that is used to override the defau 阅读全文
摘要:
await keyword blocks main thread 问题 So I have the following code private async void button1_Click(object sender, EventArgs e) { await DoSomethingAsync 阅读全文
摘要:
When correctly use Task.Run and when just async-await 回答 Note the guidelines for performing work on a UI thread, collected on my blog: Don't block the 阅读全文
摘要:
What is the difference between await Task<T> and Task<T>.Result? 问题 public async Task<string> GetName(int id) { Task<string> nameTask = Task.Factory.S 阅读全文