Exemplo n.º 1
0
        public int InsertIDENTITYWithTransactionWithMaxField(T obj, IFactory factory, string fieldMax)
        {
            string    query = GenerateQuery.CommandTextInsertIDENTITYWithMaxFiels(obj, fieldMax);
            DbCommand cmd   = factory.MakeCommand(query);

            GenerateQuery.PrepareParametersInsert(cmd, obj);
            object output = factory.ExecuteScalar(cmd);

            return(int.Parse(output.ToString()));
        }