Skip to content

Instantly share code, notes, and snippets.

@jmarmolejos
Created September 15, 2015 13:20
Show Gist options
  • Save jmarmolejos/3a28a5352ddef66a6326 to your computer and use it in GitHub Desktop.
Save jmarmolejos/3a28a5352ddef66a6326 to your computer and use it in GitHub Desktop.
public async Task<List<Notification>> Get()
{
var uriBuilder = GetCouchUrl();
using (var client = new MyCouchClient(uriBuilder.Build()))
{
var notifications = await client.Views.QueryAsync<Notification>(new QueryViewRequest("notifications-doc", "all-notifications"));
return notifications.Rows.Select(r => r.Value).ToList();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment