We're moving to .NET 4.5 and I'm considering adding async to my repositories:
interface IRepository<T>
{
T Find(int id);
Task<T> FindAsync(int id);
IEnumerable<T> FindAll();
Task<IEnumerable<T>> FindAllAsync();
...
}
Implementations will likely call DBs, WebServices, etc.
My question is, should I support CancellationToken?
(Don't worry - FindAllAsync() will probably be Rx-based :) )