BulkOpsHelper 1.0.0

dotnet add package BulkOpsHelper --version 1.0.0                
NuGet\Install-Package BulkOpsHelper -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BulkOpsHelper" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BulkOpsHelper --version 1.0.0                
#r "nuget: BulkOpsHelper, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BulkOpsHelper as a Cake Addin
#addin nuget:?package=BulkOpsHelper&version=1.0.0

// Install BulkOpsHelper as a Cake Tool
#tool nuget:?package=BulkOpsHelper&version=1.0.0                

BulkOpsHelper streamlines the creation of data validations for bulk insert and bulk update operations in SQL Server databases.

Quickstart:

  1. Run "CreateBulkOpsInfrastructure.sql" (only once) against your existing Sql Server database.

  2. Run the following stored procedure(s) as needed:

  • To scaffold a bulk INSERT feature:

  • EXEC [ZZ_BulkOpsHelper].[ScaffoldAn_INSERT_Feature] @DomainSchemaName = 'dbo_or_your_schema_name_here', @DomainTableName = 'TableNameHere', @StagingSchemaName = 'ZZ_BulkOpsHelper'

  • To scaffold a bulk UPDATE feature:

  • EXEC [ZZ_BulkOpsHelper].[ScaffoldAn_UPDATE_Feature] @DomainSchemaName = 'dbo_or_your_schema_name_here', @DomainTableName = 'TableNameHere', @StagingSchemaName = 'ZZ_BulkOpsHelper'

  • Notice row(s) added to the ZZ_BulkOpsHelper.BulkOpFeatures table.

  1. In your .NET project, install and reference the BulkOpsHelper.
  • .NET CLI: "dotnet add package BulkOpsHelper"
  • OR via package manager: "NuGet\Install-Package BulkOpsHelper"
  1. Call the BulkOpsHelper in your C# code: using SlappFramework; ... // Initialize settings... var bulkOpsSettings = new BulkOpsSettings(); bulkOpsSettings.ConnectionString = "connectionStringFromSomeConfigFile"; //...override defaults for other settings, if necessary

// Initialize a BulkOpsHelper... var bulkOpsHelper = new BulkOpsHelper(bulkOpsSettings);

// Call feature to process the given CSV data... // (Be sure CSV column headers match db column names.) DataSet results = bulkOpsHelper.ExecuteFeatureGivenFilePath( featureId: 1, csvFilePath: "C:\Path\To\CsvFile.csv"); // Returns a DataSet holding exactly 2 DataTables - // the first is a result summary, the second holds // validation errors (if any) similiar to the following: ResultTable001... IsSuccessful | RowsInserted | RowsUpdated | RowsDeleted true 1 0 0

ResultTable002 (empty if no validation errors) "Row 9, SomeColumnName: datatype invalid." "Row 10, AnotherColumName: FK violation."

Please see Slapp Framework for more details.

More About the BulkOpsHelper: Imagine you need to implement custom CSV uploads in your .NET application. The target table has foreign keys, unique keys, and custom constraints. How can you thoroughly validate a given CSV file, including providing detailed field-level feedback to the end-user, without building all the validation logic? The answer is the BulkOpsHelper!

BulkOpsHelper analyzes your destination table to provide comprehensive validations, ensuring that the data aligns with the table's definition. The core philosophy is simple: if the rules for the data are already defined in the table, why duplicate them elsewhere? BulkOpsHelper functions like an ORM but with added support for bulk operations, making it ideal for both bulk and single-record processing.

Please see Slapp Framework for more details.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 79 11/8/2024
1.0.0-beta2 65 8/2/2024
1.0.0-beta1 73 7/30/2024

First non-beta release.