EntglDb.Core
1.0.0
See the version list below for details.
dotnet add package EntglDb.Core --version 1.0.0
NuGet\Install-Package EntglDb.Core -Version 1.0.0
<PackageReference Include="EntglDb.Core" Version="1.0.0" />
<PackageVersion Include="EntglDb.Core" Version="1.0.0" />
<PackageReference Include="EntglDb.Core" />
paket add EntglDb.Core --version 1.0.0
#r "nuget: EntglDb.Core, 1.0.0"
#:package EntglDb.Core@1.0.0
#addin nuget:?package=EntglDb.Core&version=1.0.0
#tool nuget:?package=EntglDb.Core&version=1.0.0
EntglDb.Core
Core abstractions and logic for EntglDb, a peer-to-peer data synchronization middleware for .NET.
What Is EntglDb?
EntglDb is not a database � it's a sync layer that plugs into your existing data store (BLite, EF Core) and enables automatic P2P replication across nodes in a mesh network. Your application reads and writes to its database as usual; EntglDb handles synchronization in the background.
What's In This Package
- Interfaces:
IDocumentStore,IOplogStore,IVectorClockService,IConflictResolver - Models:
OplogEntry,Document,HlcTimestamp,VectorClock - Conflict Resolution:
LastWriteWinsConflictResolver,RecursiveNodeMergeConflictResolver - Production Features: Document caching (LRU), offline queue, health monitoring, retry policies
Installation
# Pick a persistence provider
dotnet add package EntglDb.Persistence.BLite # Embedded document DB
dotnet add package EntglDb.Persistence.EntityFramework # EF Core (SQL Server, PostgreSQL, etc.)
# Add networking
dotnet add package EntglDb.Network
Quick Start
// 1. Define your DbContext
public class MyDbContext : EntglDocumentDbContext
{
public DocumentCollection<string, User> Users { get; private set; }
public MyDbContext(string path) : base(path) { }
}
// 2. Create your DocumentStore (the sync bridge)
public class MyDocumentStore : BLiteDocumentStore<MyDbContext>
{
public MyDocumentStore(MyDbContext ctx, IPeerNodeConfigurationProvider cfg,
IVectorClockService vc, ILogger<MyDocumentStore>? log = null)
: base(ctx, cfg, vc, logger: log)
{
WatchCollection("Users", ctx.Users, u => u.Id);
}
protected override async Task ApplyContentToEntityAsync(
string collection, string key, JsonElement content, CancellationToken ct)
{
var user = content.Deserialize<User>()!;
user.Id = key;
var existing = _context.Users.Find(u => u.Id == key).FirstOrDefault();
if (existing != null) _context.Users.Update(user);
else _context.Users.Insert(user);
await _context.SaveChangesAsync(ct);
}
// ... implement other abstract methods
}
// 3. Register and use
builder.Services.AddEntglDbCore()
.AddEntglDbBLite<MyDbContext, MyDocumentStore>(
sp => new MyDbContext("data.blite"))
.AddEntglDbNetwork<StaticPeerNodeConfigurationProvider>();
Key Concepts
| Concept | Description |
|---|---|
| CDC | Change Data Capture � watches collections registered via WatchCollection() |
| Oplog | Append-only hash-chained journal of changes per node |
| VectorClock | Tracks causal ordering across the mesh |
| DocumentStore | Your bridge between entities and the sync engine |
Architecture
Your App ? DbContext.SaveChangesAsync()
?
? CDC Trigger
DocumentStore.CreateOplogEntryAsync()
?
??? OplogEntry (hash-chained, HLC timestamped)
??? VectorClockService.Update()
?
?
SyncOrchestrator (background)
??? Push to peers
??? Pull from peers ? ApplyBatchAsync
Related Packages
- EntglDb.Persistence.BLite � BLite embedded provider (.NET 10+)
- EntglDb.Persistence.EntityFramework � EF Core provider (.NET 8+)
- EntglDb.Network � P2P networking (UDP discovery, TCP sync, Gossip)
Documentation
License
MIT � see LICENSE
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. 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. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.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. |
-
.NETStandard 2.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.Text.Json (>= 6.0.10)
-
net6.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- System.Text.Json (>= 6.0.10)
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 6.0.0)
- Microsoft.Extensions.Options (>= 6.0.0)
- System.Text.Json (>= 8.0.5)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on EntglDb.Core:
| Package | Downloads |
|---|---|
|
EntglDb.Network
Networking layer (TCP/UDP/Gossip) for EntglDb. |
|
|
EntglDb.Persistence.Sqlite
SQLite persistence provider for EntglDb. |
|
|
EntglDb.Persistence.EntityFramework
Entity Framework Core persistence provider for EntglDb. Generic implementation supporting any EF Core database provider (SQL Server, PostgreSQL, MySQL, SQLite, etc). |
|
|
EntglDb.Persistence
Persistence provider for EntglDb. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 0 | 2/18/2026 |
| 1.0.0 | 0 | 2/18/2026 |
| 0.9.1 | 253 | 1/28/2026 |
| 0.8.6 | 243 | 1/27/2026 |
| 0.8.5 | 247 | 1/26/2026 |
| 0.8.4 | 250 | 1/22/2026 |
| 0.8.3 | 239 | 1/22/2026 |
| 0.8.2 | 240 | 1/21/2026 |
| 0.8.1 | 239 | 1/21/2026 |
| 0.8.0 | 232 | 1/21/2026 |
| 0.7.7 | 147 | 1/21/2026 |
| 0.7.6 | 154 | 1/20/2026 |
| 0.7.5 | 157 | 1/20/2026 |
| 0.7.4 | 157 | 1/20/2026 |
| 0.7.3 | 144 | 1/19/2026 |
| 0.7.2 | 156 | 1/19/2026 |
| 0.7.1 | 155 | 1/19/2026 |
| 0.7.0 | 159 | 1/19/2026 |
| 0.6.1 | 159 | 1/18/2026 |
| 0.6.0 | 165 | 1/17/2026 |