Exemplo n.º 1
0
        /// <summary>
        ///  插入一个实体
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="fields"></param>
        /// <param name="values"></param>
        /// <returns></returns>
        public int Insert <T>(Table table, Field[] fields, object[] values)
            where T : Entity
        {
            List <FieldValue> fvlist = DataHelper.CreateFieldValue(fields, values, true);
            object            retVal;

            return(dbBatch.Insert <T>(table, fvlist, out retVal));
        }
Exemplo n.º 2
0
 /// <summary>
 ///  插入一个实体
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="fields"></param>
 /// <param name="values"></param>
 /// <returns></returns>
 public int Insert <T>(Table table, Field[] fields, object[] values)
     where T : Entity
 {
     return(dbBatch.Insert <T>(table, fields, values));
 }