<commit_before>﻿# DbLite

[![Build status](https://ci.appveyor.com/api/projects/status/bw0rglovw5508yj1/branch/master?svg=true)](https://ci.appveyor.com/project/NsdWorkBook/dblite/branch/master)

A simple micro ORM

# Sample

```csharp
// Start a transaction
using (new System.Transactions.TransactionScope())
{
    // Get a instance of IDbConnection, this can be SQLiteConnection, SQLConnection, etc
    using (var db = Fixture.Open())
    {
        var record = new SimpleTable
        {
            Interger1 = 22,
            String1 = "Hello! This is an insert"
        };
        db.Insert(record);

        record.String1 = "We just changed the text using an update!";
        db.Update(record);

        // Select all records where Interger1 is 22
        List<SimpleTable> records = db.Select<SimpleTable>("Interger1 = @Id", new { Id = 22 });

        // And now we just deleted all the records
        records.ForEach(x => db.Delete(x));
    }
}
```

# Notes

* Everything is parameterized, no inline variables
* Currently there is only a dialect providers for SQLite and MSSQL
* Test coverage is spotty at best

# Requirements

* Visual Studio 2015 or newer
* .NET 4.5.2<commit_msg>Added section with nuget package links<commit_after># DbLite

[![Build status](https://ci.appveyor.com/api/projects/status/bw0rglovw5508yj1/branch/master?svg=true)](https://ci.appveyor.com/project/NsdWorkBook/dblite/branch/master)

A simple micro ORM

# Sample

```csharp
// Start a transaction
using (new System.Transactions.TransactionScope())
{
    // Get a instance of IDbConnection, this can be SQLiteConnection, SQLConnection, etc
    using (var db = Fixture.Open())
    {
        var record = new SimpleTable
        {
            Interger1 = 22,
            String1 = "Hello! This is an insert"
        };
        db.Insert(record);

        record.String1 = "We just changed the text using an update!";
        db.Update(record);

        // Select all records where Interger1 is 22
        List<SimpleTable> records = db.Select<SimpleTable>("Interger1 = @Id", new { Id = 22 });

        // And now we just deleted all the records
        records.ForEach(x => db.Delete(x));
    }
}
```

# Packages
* [![NuGet](https://img.shields.io/nuget/v/DbLite.svg?maxAge=2592000)](https://www.nuget.org/packages/DbLite/) DbLite 
* [![NuGet](https://img.shields.io/nuget/v/DbLite.MSSQL.svg?maxAge=2592000)](https://www.nuget.org/packages/DbLite.MSSQL/) DbLite.MSSQL
* [![NuGet](https://img.shields.io/nuget/v/DbLite.SQLite.svg?maxAge=2592000)](https://www.nuget.org/packages/DbLite.SQLite/) DbLite.SQLite

# Notes

* Everything is parameterized, no inline variables
* Currently there are only dialect providers for SQLite and MSSQL
* Test coverage is spotty

# Requirements

* Visual Studio 2015 or newer
* .NET 4.5.2
{'fraction_non_alphanumeric': 0.12718204488778054, 'fraction_numerical': 0.02458140363377271, 'mean_word_length': 3.0992700729927005, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 10, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2576617', 'n_tokens_mistral': 962, 'n_tokens_neox': 898, 'n_words': 228}