C# Database

Open-source C# projects categorized as Database

Top 23 C# Database Projects

  • GitHub repo Entity Framework

    EF Core is a modern object-database mapper for .NET. It supports LINQ queries, change tracking, updates, and schema migrations.

    Project mention: How is EF different from embedding sql? | reddit.com/r/dotnetcore | 2021-06-10

    https://github.com/dotnet/efcore/issues/795 the number of duplicate issues assigned to it suggests it is quite a popular request.

  • GitHub repo LiteDB

    LiteDB - A .NET NoSQL Document Store in a single data file - https://www.litedb.org

  • GitHub repo Bogus

    :card_index: A simple and sane fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.

    Project mention: String similarity search and fast LIKE operator using pg_trgm | dev.to | 2021-05-11

    I inserted 10M rows of fake data generated by Bogus into the table. You can download the dump here.

  • GitHub repo Event Store

    The stream database optimised for event sourcing

    Project mention: 3 reasons to adopt Event Sourcing | dev.to | 2021-04-01

    Where's the catch, then? Well, there's a couple of catches, in fact. First of all, in a distributed setting, appending data to a log isn't that easy. First, you need to make your log distributed. Again, Kafka/Cassandra/EventStore make this possible, however, whenever you start dealing with distributed data, you‘re introducing new operational and implementation complexity.

  • GitHub repo RavenDB

    ACID Document Database

  • GitHub repo FluentMigrator

    Fluent migrations framework for .NET

  • GitHub repo Npgsql

    Npgsql is the .NET data provider for PostgreSQL. (by npgsql)

    Project mention: .NET Core devs working with Postgres, how you do you resolve the DateTime precision discrepancy between .NET and Postgres? | reddit.com/r/dotnet | 2021-03-31

    I went off of what I was told by the npgsql maintainer. If you have different information that proves this false I’m all ears.

  • GitHub repo LINQ to DB

    Linq to database provider.

    Project mention: Is there a widely used hibernate-like ORM framework for .net core? | reddit.com/r/dotnet | 2021-04-29
  • GitHub repo Pomelo.EntityFrameworkCore.MySql

    Entity Framework Core provider for MySQL and MariaDB built on top of MySqlConnector

    Project mention: Question about C# and MySql | reddit.com/r/csharp | 2021-02-18

    For MySQL and friends you'll need the Pomelo data provider from https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql . Turns out there's an example of using the MySQL provider about halfway down that shows how to, but it is missing the '-o Model' parameter that you'd use to get your database model into a folder called Model.

  • GitHub repo SqlKata Query Builder

    SQL query builder, written in c#, helps you build complex queries easily, supports SqlServer, MySql, PostgreSql, Oracle, Sqlite and Firebird

    Project mention: Windyquery: A non-blocking Python PostgreSQL query builder | news.ycombinator.com | 2021-05-10

    That is basically the description of an object mapper, with all the guarantees of an object mapper :). It seems if you actually use the query builder as such, no guarantees exist.

    I'm pretty picky regarding query builders and ORM's, to the extent of having written several of them over the years, in different languages (both dynamic and strong typed, unfortunately closed-source). I'm a strong advocate of schema-first design, and usually a query builder will allow you to design your queries explicitly, but having some internal behaviors (such as string concatenation, identifier quoting and automatic in-order separation of parameters and values to be bound) taken care of. As good examples of this, I'd mention golang's goqu (https://github.com/doug-martin/goqu) and - to some extent - C# SqlKata (https://sqlkata.com/). Following my frustrations with Python ORMs, I built my own toy project, sort-of-in-beta, called rickdb (https://github.com/oddbit-project/rick_db).

  • GitHub repo PKHeX

    Pokémon Save File Editor

    Project mention: Recap of attempt 19 | reddit.com/r/nuzlocke | 2021-05-16
  • GitHub repo Marten

    .NET Transactional Document DB and Event Store on PostgreSQL

  • GitHub repo Entity Framework 6

    This is the codebase for Entity Framework 6 (previously maintained at https://entityframework.codeplex.com). Entity Framework Core is maintained at https://github.com/dotnet/efcore.

    Project mention: Ask HN: What tangible benefits did you get from spending time on HN? | news.ycombinator.com | 2021-03-06

    Every so often, posts from Bruce Dawson's blog get posted here - one such post was about using Event Tracing for Windows to diagnose an issue with an NTFS lock being held causing 63 cores to idle while 1 does all the work.

    https://randomascii.wordpress.com/2019/10/20/63-cores-blocke...

    A few months later, some other people in my team were struggling to diagnose an issue in production where a legacy webapp was struggling to scale up and fully use all 64 cores of the server we needed it to run on. I stepped in to help and remembered that post I'd seen on HN. We used ETW (through Windows Performance Recorder and Windows Performance Analyzer) to profile our app and I looked into the Wait Analysis. Turns out that Entity Framework 6 uses a ReaderWriterLockSlim to guard a cache, and that particular lock performs extremely poorly under heavy contention. Heavy in our case meant that for a single page build of one of this app's "hot path" pages, this lock would be taken a few hundred thousand times. We weren't the first to discover this:

    https://github.com/dotnet/ef6/issues/1500

    What some other people in my team were struggling with for about two weeks was resolved in a single day thanks to me goofing off and reading HN. (We ultimately used a fork of EF6 that didn't suffer from this issue to solve our problem)

  • GitHub repo Realm Xamarin

    Realm is a mobile database: a replacement for SQLite & ORMs

    Project mention: Offline Sync - What are the current options | reddit.com/r/xamarindevelopers | 2021-05-26

    I'm also looking into a local DB for storage and am looking at Realm (Xamarin example).

  • GitHub repo efcore.pg

    Entity Framework Core provider for PostgreSQL

    Project mention: Announcing Entity Framework Core 6.0 Preview 4: Performance Edition | reddit.com/r/dotnet | 2021-05-30
  • GitHub repo Yessql

    A .NET document database working on any RDBMS

  • GitHub repo NPoco

    Simple microORM that maps the results of a query onto a POCO object. Project based on Schotime's branch of PetaPoco

  • GitHub repo Insight.Database

    Fast, lightweight .NET micro-ORM

  • GitHub repo Cassandra

    DataStax C# Driver for Apache Cassandra

    Project mention: Alguna alternativa a MSSQL que no sea MySQL o PostgreSQL | reddit.com/r/CharruaDevs | 2021-06-05

    Sólo he usado el protocolo de Cassandra desde Go, pero por lo que veo para .NET en vez de pagar por eso usaría el driver de DataStax que implementa el mismo protocolo y es open source: https://github.com/datastax/csharp-driver

  • GitHub repo monitor-table-change-with-sqltabledependency

    Get SQL Server notification on record table change

    Project mention: Suggestions for how to implement this real-time app? | reddit.com/r/webdev | 2021-05-27
  • GitHub repo BrightstarDb

    This is the core development repository for BrightstarDB.

  • GitHub repo DBreeze

    C# .NET MONO NOSQL ( key value store embedded ) ACID multi-paradigm database management system.

  • GitHub repo Ceras

    Universal binary serializer for a wide variety of scenarios https://discord.gg/FGaCX4c

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020). The latest post mention was on 2021-06-10.

Index

What are some of the best open-source Database projects in C#? This list will help you:

Project Stars
1 Entity Framework 10,284
2 LiteDB 5,784
3 Bogus 4,546
4 Event Store 4,197
5 RavenDB 2,737
6 FluentMigrator 2,527
7 Npgsql 2,276
8 LINQ to DB 2,066
9 Pomelo.EntityFrameworkCore.MySql 1,967
10 SqlKata Query Builder 1,915
11 PKHeX 1,568
12 Marten 1,516
13 Entity Framework 6 1,239
14 Realm Xamarin 947
15 efcore.pg 875
16 Yessql 834
17 NPoco 772
18 Insight.Database 617
19 Cassandra 493
20 monitor-table-change-with-sqltabledependency 476
21 BrightstarDb 427
22 DBreeze 392
23 Ceras 388