Does this two methods works the same way? Both of this block main thread, isn't?
// 1. Use async method
public IEnumerable<Entity> AsyncMethod()
// 2. Use sync method
public IEnumerable<Entity> SyncMethod()
Does this two methods works the same way?
Pretty much, the second approach has one less context switch.
Both of this block main thread, isn't?
Result would block until the
ToList task had completed. Second approach is not
When it come to just
Result may not make much sense.