Created
January 10, 2013 00:09
-
-
Save nigel-sampson/4498210 to your computer and use it in GitHub Desktop.
Returning Null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class RetailersService : AppServiceBase | |
{ | |
public async Task<IList<Retailer>> GetRetailersAsync() | |
{ | |
return await BlobCache.LocalMachine.GetOrFetchObject("retailers", DownloadRetailersAsync); | |
} | |
private Task<IList<Retailer>> DownloadRetailersAsync() | |
{ | |
IList<Retailer> retailers = Enumerable.Range(0, 20) | |
.Select(i => new Retailer { Id = i, Name = String.Format("Retailer {0}", i) }) | |
.ToList(); | |
return Task.FromResult(retailers); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
On WinRT? See reactiveui/Akavache#21 as I hit the same issue on the weekend...