private static async Task CreateUserIfNotExists(IBundle bundle, string email) { // note: must be a command var userExists = await bundle.Query(new EmailExists() { Email = email }); if (!userExists) { await bundle.Do(new CreateUser() { Email = email }); Console.WriteLine("\tuser {0} created", email); } else { Console.WriteLine("\tuser {0} exists", email); } }