/// <summary> /// Performs one "insert into" database command in a transactional context. /// * The method uses a transaction object already created and does not close the connection. /// * Must have "MultipleActiveResultSets=True" on connection string. /// </summary> /// <param name="CategoriesInfo">Object to insert.</param> /// <param name="transaction">Inform "DBTransaction".</param> /// <param name="errorMessage">Error message if exception is throwed.</param> public virtual void InsertOne(CategoriesInfo parCategoriesInfo, DbTransaction transaction, out string errorMessage) { errorMessage = string.Empty; CategoriesDAO.InsertOne(parCategoriesInfo, transaction, out errorMessage); //By default, the caller of this method will do the commit. //motor.Commit(); //motor.CloseConnection(); }