Skip to content

Instantly share code, notes, and snippets.

@ayende
Created April 19, 2020 20:48
Show Gist options
  • Save ayende/55156a8f7b9d5acd4b798e1933494bdf to your computer and use it in GitHub Desktop.
Save ayende/55156a8f7b9d5acd4b798e1933494bdf to your computer and use it in GitHub Desktop.
public static async Task<Article[]> SearchByAuthor(string author)
{
var articles = await DbHelper.ExecuteQueryAsync<Article>(CollectionId,
new QueryDefinition("SELECT * FROM articles AS a WHERE lower(a.author) = @author")
.WithParameter("@author", author.ToLower())
, author);
return articles;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment