public async Task Apply(TodoListDeleted evnt) { using (IDbConnection dbConnection = new NpgsqlConnection(_connectionString)) { dbConnection.Open(); int result = await dbConnection.ExecuteAsync( "DELETE FROM todolists WHERE id = @Id", new { Id = Guid.Parse(evnt.ListId) }); } }
public async Task Apply(TodoListDeleted evnt) { await _store.DeleteByIdAsync(evnt.ListId); }