I have .net 4.0 application does a heavy database search. I want these operations to be asynchronous and also it should be cancellable. Async and await works fine in .net 4.5 which also has executereaderasync methods for Async db operations. But i cannot upgrade to .net 4.5. Task based programming can be used but asynchronizing the db search is priority. Can someone suggest posdible options of achieving this in .net 4.0.
I think using async and await would not completely suffice because 4.5 has executereaderasync methods which 4.0 doea not have. Normal executereader is synchronous