Exemplo n.º 1
0
        public bool Insert <T>(T instance)
        {
            if (instance == null)
            {
                throw new DataIsNullException();
            }

            string sql        = StoreBase.BuildInsertSQL(instance);
            var    parameters = StoreBase.BuildParameters(ExpressionFactory.GetColumnList(instance));

            bool isNewConnection = TransactionIsOpen.Value;

            return(_dbSQLHelper.ExecuteNonQuery(isNewConnection, _consolePrintSql, sql, _dbSQLHelper.Convert(parameters)) > 0);
        }