Search Results for

    Show / Hide Table of Contents
    View Source

    Class NPocoSqlServerDatabaseExtensions

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Persistence.SqlServer
    Assembly: Umbraco.Cms.Persistence.SqlServer.dll
    Syntax
    public static class NPocoSqlServerDatabaseExtensions

    Methods

    View Source

    ConfigureNPocoBulkExtensions()

    Configures NPoco's SqlBulkCopyHelper to use the correct SqlConnection and SqlTransaction instances from the underlying RetryDbConnection and ProfiledDbTransaction

    Declaration
    public static void ConfigureNPocoBulkExtensions()
    Remarks

    This is required to use NPoco's own method because we use wrapped DbConnection and DbTransaction instances. NPoco's InsertBulk method only caters for efficient bulk inserting records for Sql Server, it does not cater for bulk inserting of records for any other database type and in which case will just insert records one at a time. NPoco's InsertBulk method also deals with updating the passed in entity's PK/ID once it's inserted whereas our own BulkInsertRecords methods do not handle this scenario.

    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • ConfigureNPocoBulkExtensions()
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX