Ejemplo n.º 1
0
        /// <summary>
        /// <see cref="ExistsBySqlString"/>를 비동기 방식으로 수행합니다.
        /// </summary>
        /// <param name="repository"><see cref="IAdoRepository"/>의 인스턴스</param>
        /// <param name="sqlString">실행할 쿼리문</param>
        /// <param name="parameters">패러미터</param>
        /// <returns>Exists 결과를 가지는 Task</returns>
        public static Task <bool> ExistsBySqlStringAsync(this IAdoRepository repository, string sqlString,
                                                         params IAdoParameter[] parameters)
        {
            sqlString.ShouldNotBeWhiteSpace("sqlString");

            if (IsDebugEnabled)
            {
                log.Debug("비동기 방식으로 IAdoRepository.ExistsBySqlString()을 수행합니다... sqlString=[{0}], parameters=[{1}]",
                          sqlString, parameters.CollectionToString());
            }

            return(Task.Factory.StartNew(() => repository.ExistsBySqlString(sqlString, parameters)));
        }