/// <summary>
        /// Deletes the specified entity type by identifier.
        /// </summary>
        /// <typeparam name="T">The entity type.</typeparam>
        /// <param name="connection">The connection.</param>
        /// <param name="id">The identifier.</param>
        /// <returns><see cref="Task"/> representing the deletion operation.</returns>
        public static async Task Delete <T>(this IDbConnection connection, object id)
        {
            TypeMap type = TypeMap.GetTypeMap <T>();

            // validate the key properties
            id = type.ValidateKeyProperties(id);

            // delete
            await connection.QueryAsync <T>(SqlBuilder.BuildDeleteById(type), id)
            .ConfigureAwait(false);
        }