/// <summary> /// 异步的,通知应用程序,一个 <see cref="DbCommand"/> 已经执行。 /// </summary> /// <param name="command">所执行的 <see cref="DbCommand"/> 对象。</param> /// <param name="parameters"></param> /// <param name="func">执行的方法。</param> private async Task <T> AfterCommandExecutedAsync <T>(DbCommand command, ParameterCollection parameters, Func <Task <T> > func) { var result = default(T); var period = await TimeWatcher.WatchAsync(async() => result = await func()); await HandleLogAsync(command, period); command.SyncParameters(parameters); command.ClearParameters(); return(result); }