Ejemplo n.º 1
0
        public virtual int InsertEntity(tEntity entity)
        {
            int eff = 0;

            try
            {
                string           insertSql = string.Format(GetInsertSQL(), _DefaultIndex.ToString());
                IDataParameter[] para      = _SQLDataMappingExtension.GetDataParameter(entity, _DefaultIndex);
                eff = _SQLDataCommand.ExcuteNonQuery(insertSql, CommandType.Text, para);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(eff);
        }