Skip to content

Instantly share code, notes, and snippets.

@MrDustpan
MrDustpan / Example.cs
Created September 4, 2015 17:17
Example usage of async command/query implementation
public class FetchUserByEmailQuery : IQuery<User>
{
private readonly string email;
public FetchUserByEmailQuery(string email)
{
this.email = email;
}
public async Task<User> ExecuteAsync(IDbConnection db)
@MrDustpan
MrDustpan / CommandQuery.cs
Created September 4, 2015 17:17
Command/query implementation with async methods
using System.Data;
namespace CommandQuery
{
public interface ICommand
{
Task ExecuteAsync(IDbConnection db);
}
public interface IQuery<T>
@MrDustpan
MrDustpan / 0_reuse_code.js
Created July 2, 2014 19:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console