Bodoconsult.Database.Dbase.Ef 1.0.11

dotnet add package Bodoconsult.Database.Dbase.Ef --version 1.0.11
                    
NuGet\Install-Package Bodoconsult.Database.Dbase.Ef -Version 1.0.11
                    
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="Bodoconsult.Database.Dbase.Ef" Version="1.0.11" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bodoconsult.Database.Dbase.Ef" Version="1.0.11" />
                    
Directory.Packages.props
<PackageReference Include="Bodoconsult.Database.Dbase.Ef" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bodoconsult.Database.Dbase.Ef --version 1.0.11
                    
#r "nuget: Bodoconsult.Database.Dbase.Ef, 1.0.11"
                    
#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.
#:package Bodoconsult.Database.Dbase.Ef@1.0.11
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Bodoconsult.Database.Dbase.Ef&version=1.0.11
                    
Install as a Cake Addin
#tool nuget:?package=Bodoconsult.Database.Dbase.Ef&version=1.0.11
                    
Install as a Cake Tool

Bodoconsult.Database.Dbase.Ef

What does the library

Bodoconsult.Database.Dbase.Ef allows reading data from DBase or Clipper DBF database files and store it with Entity Framework in a SQL database.

How to use the library

The source code contain a NUnit test classes, the following source code is extracted from. The samples below show the most helpful use cases for the library.

How to use the Bodoconsult.Database.Dbase.Ef

Reading DBF file in an environment using Bodoconsult.Database.Ef and Entity Framework

[Test]
public void Execute_ValidSetupEf_PropertiesSetCorrectly()
{
    // Arrange 
    ClearArticles();

    var task = new DbfImportEfTask<Article>(DbfFileName, _folderPath, _logger, MapToEntityDelegate, _unitOfWork)
    {
        UseBulkInsert = false,
        BatchSize = 50
    };
    Assert.That(Count(), Is.EqualTo(0));

    // Act  
    task.Execute();

    // Assert
    Assert.That(Count(), Is.Not.EqualTo(0));
}

RowVersion fields and integer primary key fields cannot be transferred using DbfImportEfTask<TData> by default. Inserting existing integer primary keys is possible by bringing the database in a mode allowing this and turning of this mode later by SqlServer specific SQL commands. Fields to not transfer can set by addig their names to Repository<TData>.FieldsNotAllowedForBulkCopy or RepositoryGuid<TData>.FieldsNotAllowedForBulkCopy list. By default the fields RowVersion and Id are excluded.

Reading DBF file in an environment using Bodoconsult.Database and plain System.Data

To store the read DBF file data to another database using Bodoconsult.Database you have to implement a super class derived from DbfImportBaseTask<TData> overriding the method StoreData(List<TData> data) with the code required to save the data to your data table by using plain SQL or ADO.NET.

About us

Bodoconsult (http://www.bodoconsult.de) is a Munich based software development company from Germany.

Robert Leisner is senior software developer at Bodoconsult. See his profile on http://www.bodoconsult.de/Curriculum_vitae_Robert_Leisner.pdf.

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
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.11 101 11/2/2026
1.0.10 89 11/2/2026

New implementation