Beispiel #1
0
        /// <summary>
        ///     The commit async.
        /// </summary>
        /// <returns>
        ///     The <see cref="Task" />.
        /// </returns>
        public virtual async Task <int> CommitAsync()
        {
            if (CurrentSession?.Transaction != null && CurrentSession.Transaction.IsActive)
            {
                await CurrentSession?.Transaction.CommitAsync();

                CloseTransaction();
            }
            else
            {
                await CurrentSession?.FlushAsync();
            }

            return(1);
        }