System.Data.Common.DbCommand.GenerateInsertForSqlServer(object, string)

Here are the examples of the csharp api class System.Data.Common.DbCommand.GenerateInsertForSqlServer(object, string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

View license
public static DatabaseCommand GenerateInsertForSqlServer( this DatabaseCommand databaseCommand, object obj, string tableName = null )
        {
            databaseCommand.DbCommand.GenerateInsertForSqlServer( obj, tableName );

            return databaseCommand;
        }

2. Example

View license
public static DbCommand GenerateInsertsForSqlServer<T>( this DbCommand dbCommand, List<T> listOfObjects, string tableName = null )
        {
            foreach ( T obj in listOfObjects )
            {
                dbCommand.GenerateInsertForSqlServer( obj, tableName );
            }

            return dbCommand;
        }