iBATIS.NET Class Library DataMapper V1.6.1, DataAccess V1.9.1

SqlMapper.Insert Method 

Executes a Sql INSERT statement. Insert is a bit different from other update methods, as it provides facilities for returning the primary key of the newly inserted row (rather than the effected rows). This functionality is of course optional.

The parameter object is generally used to supply the input data for the INSERT values.
[Visual Basic]
NotOverridable Public Function Insert( _
   ByVal String As String, _
   ByVal Object As Object _
) As Object _
    Implements ISqlMapper.
[C#]
public object Insert(
   String statementName,
   Object parameterObject
);

Parameters

statementName
The name of the statement to execute.
parameterObject
The parameter object.

Return Value

The primary key of the newly inserted row. This might be automatically generated by the RDBMS, or selected from a sequence table or other source.

Implements

ISqlMapper.

See Also

SqlMapper Class | IBatisNet.DataMapper Namespace