ServantSoftware.Data.Csv 1.0.0.298

dotnet add package ServantSoftware.Data.Csv --version 1.0.0.298                
NuGet\Install-Package ServantSoftware.Data.Csv -Version 1.0.0.298                
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="ServantSoftware.Data.Csv" Version="1.0.0.298" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ServantSoftware.Data.Csv --version 1.0.0.298                
#r "nuget: ServantSoftware.Data.Csv, 1.0.0.298"                
#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 ServantSoftware.Data.Csv as a Cake Addin
#addin nuget:?package=ServantSoftware.Data.Csv&version=1.0.0.298

// Install ServantSoftware.Data.Csv as a Cake Tool
#tool nuget:?package=ServantSoftware.Data.Csv&version=1.0.0.298                

CSV ADO.NET Data Provider

Package Name Release (NuGet)
ServantSoftware.Data.Csv NuGet

The CSV ADO.NET Data Provider offers a set of classes that facilitate data access to CSV files using the ADO.NET framework. It provides CRUD (Create, Read, Update, Delete) operations to interact with CSV files as if they were a database. The CSV format (as specified in RFC 4180 has no data typing. As a result, all data stored in the XML files is data typed as a string.

Features

  • ADO.NET compliant provider for CSV files.
  • Support for CRUD operations.
  • Implementation of ADO.NET interfaces for consistency with other data providers.
  • Customizable and extendable to meet specific needs.
  • Comprehensive XML comments to assist with usage.

Getting Started

Prerequisites

  • .NET 7.0 or later.
  • An IDE that supports .NET development, such as Visual Studio.

Installation

You can install the CSV ADO.NET Data Provider from the NuGet package manager or by using the following command in your terminal:

dotnet add package ServantSoftware.Data.Csv

Usage

To use the CSV ADO.NET Data Provider, you'll need to create a CsvConnection instance, then create a CsvCommand instance, and execute it. Here's an example:

using System.Data.CsvClient;

var connectionString = new FileConnectionString() { DataSource = "path/to/your/folder" };
using var connection = new CsvConnection(connectionString);
connection.Open();

var commandText = "SELECT * FROM your_table_name_without_extension";
using var command = new CsvCommand(commandText, connection);
using var reader = command.ExecuteReader();

while (reader.Read())
{
    // Process data
}

connection.Close();

Connection String

The connection string is used mainly to determine the data source for the provider. The data source will always be a path to a folder.

Folder As Database

In this mode, the folder represents the CSV database, and each CSV file in the folder represents a table. The file name then becomes the table's name, minus the .csv extension, and you can expect the data within the file to be rows of comma-separated values.

For example, if there's a file named employees.csv with the following content:

name,email,salary,married
Joe,Joe@gmail.com,56000,true
Bob,bob32@gmail.com,95000,

In the above example, this table would have 4 columns, one for each unique header. The absence of a value, as seen for the "married" property in the second row, would be represented internally as null.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

  • Thanks to the .NET Foundation for the ADO.NET framework.
  • Special gratitude to those who have provided invaluable feedback and contributions to this project.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ServantSoftware.Data.Csv:

Package Downloads
ServantSoftware.EFCore.Csv

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0.298 62 1/8/2025
1.0.0.297 86 1/7/2025
1.0.0.296 147 12/18/2024
1.0.0.295 98 12/18/2024
1.0.0.294 91 12/18/2024
1.0.0.293 97 12/18/2024
1.0.0.289 98 12/17/2024
1.0.0.288 92 12/16/2024
1.0.0.287 108 12/16/2024
1.0.0.286 98 12/14/2024
1.0.0.285 88 12/14/2024
1.0.0.284 101 12/11/2024
1.0.0.283 95 12/11/2024
1.0.0.282 101 12/10/2024
1.0.0.281 99 12/10/2024
1.0.0.280 97 12/10/2024
1.0.0.279 113 11/18/2024
1.0.0.278 101 11/15/2024
1.0.0.277 96 11/15/2024
1.0.0.276 95 11/15/2024
1.0.0.275 107 11/13/2024
1.0.0.274 109 11/13/2024
1.0.0.273 112 11/12/2024
1.0.0.272 116 11/11/2024
1.0.0.271 111 11/5/2024
1.0.0.270 104 11/5/2024
1.0.0.269 117 11/5/2024
1.0.0.268 107 11/1/2024
1.0.0.267 105 11/1/2024
1.0.0.266 112 11/1/2024
1.0.0.265 104 11/1/2024
1.0.0.264 102 11/1/2024
1.0.0.263 105 10/6/2024
1.0.0.262 106 10/6/2024
1.0.0.261 111 10/2/2024
1.0.0.260 108 10/2/2024
1.0.0.259 219 6/8/2024
1.0.0.258 192 4/17/2024
1.0.0.257 129 4/17/2024
1.0.0.256 131 4/17/2024
1.0.0.254 123 4/15/2024
1.0.0.253 130 4/15/2024
1.0.0.252 125 4/14/2024
1.0.0.251 122 4/14/2024
1.0.0.250 143 4/13/2024
1.0.0.249 121 4/13/2024
1.0.0.248 125 4/11/2024
1.0.0.247 127 4/11/2024
1.0.0.246 134 4/1/2024
1.0.0.245 132 4/1/2024
1.0.0.242 130 3/27/2024
1.0.0.241 118 3/27/2024
1.0.0.240 144 3/27/2024
1.0.0.239 114 3/27/2024
1.0.0.238 151 3/16/2024
1.0.0.237 134 3/16/2024
1.0.0.236 169 2/14/2024
1.0.0.235 215 12/20/2023
1.0.0.233 234 10/23/2023
1.0.0.232 151 10/23/2023
1.0.0.231 152 10/23/2023
1.0.0.230 153 10/23/2023
1.0.0.229 150 10/23/2023
1.0.0.228 153 10/22/2023
1.0.0.227 147 10/22/2023
1.0.0.226 152 10/22/2023
1.0.0.225 150 10/22/2023
1.0.0.224 153 10/22/2023
1.0.0.223 156 10/22/2023
1.0.0.222 140 10/22/2023
1.0.0.221 174 10/22/2023
1.0.0.220 147 10/21/2023
1.0.0.219 160 10/21/2023
1.0.0.218 146 10/21/2023
1.0.0.217 142 10/21/2023
1.0.0.216 149 10/21/2023
1.0.0.215 137 10/21/2023
1.0.0.214 137 10/21/2023
1.0.0.213 152 10/21/2023
1.0.0.212 152 10/21/2023
1.0.0.211 147 10/20/2023
1.0.0.210 132 10/20/2023
1.0.0.209 148 10/20/2023
1.0.0.208 157 10/20/2023
1.0.0.207 143 10/20/2023
1.0.0.206 170 10/20/2023
1.0.0.205 131 10/20/2023
1.0.0.204 150 10/19/2023
1.0.0.203 138 10/17/2023
1.0.0.202 160 10/10/2023
1.0.0.201 180 10/7/2023
1.0.0.200 158 10/3/2023
1.0.0.199 168 10/2/2023
1.0.0.198 166 10/2/2023
1.0.0.195 140 9/27/2023
1.0.0.194 157 9/27/2023
1.0.0.193 156 9/27/2023
1.0.0.192 158 9/27/2023
1.0.0.191 165 9/26/2023
1.0.0.189 158 9/22/2023
1.0.0.188 150 9/22/2023
1.0.0.187 154 9/22/2023
1.0.0.186 166 9/19/2023
1.0.0.185 151 9/18/2023
1.0.0.184 176 9/17/2023
1.0.0.183 138 9/17/2023
1.0.0.182 164 9/16/2023
1.0.0.181 158 9/15/2023
1.0.0.179 161 9/14/2023
1.0.0.178 167 9/14/2023
1.0.0.176 157 9/13/2023
1.0.0.175 170 9/9/2023
1.0.0.174 166 9/8/2023
1.0.0.173 169 9/1/2023
1.0.0.172 180 9/1/2023
1.0.0.171 166 8/31/2023
1.0.0.170 166 8/25/2023
1.0.0.169 179 8/24/2023