AppXDev.SyncEntityFramework
0.4.2
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package AppXDev.SyncEntityFramework --version 0.4.2
NuGet\Install-Package AppXDev.SyncEntityFramework -Version 0.4.2
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="AppXDev.SyncEntityFramework" Version="0.4.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AppXDev.SyncEntityFramework" Version="0.4.2" />
<PackageReference Include="AppXDev.SyncEntityFramework" />
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 AppXDev.SyncEntityFramework --version 0.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: AppXDev.SyncEntityFramework, 0.4.2"
#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 AppXDev.SyncEntityFramework@0.4.2
#: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=AppXDev.SyncEntityFramework&version=0.4.2
#tool nuget:?package=AppXDev.SyncEntityFramework&version=0.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
AppXDev.SyncEntityFramework
A bidirectional Entity Framework sync framework for distributed retail systems. Synchronize data between a central server and multiple store locations using SQL Server and message-based communication.
Features
- 🔄 Bidirectional Sync - Push and pull changes between central and store databases
- ⚡ Conflict Resolution - Configurable strategies (LastWriteWins, Merge, Manual)
- 📦 Entity Framework Core - Built on EF Core 9.0 with change tracking
- 🐰 RabbitMQ Integration - Message-based real-time sync notifications
- 🏪 Multi-Store Support - Scale to 100+ store locations
- 📝 Offline Support - Queue changes locally when disconnected (roadmap)
Installation
# Full SDK (includes Domain, Application, and Infrastructure)
dotnet add package AppXDev.SyncEntityFramework
# Or install individual packages
dotnet add package AppXDev.SyncEntityFramework.Domain
dotnet add package AppXDev.SyncEntityFramework.Application
Quick Start
1. Define Syncable Entities
using AppXDev.Sync.Domain.Entities;
public class Product : SyncEntity
{
public string Name { get; set; } = string.Empty;
public decimal Price { get; set; }
public int CategoryId { get; set; }
}
2. Configure Service Registration (DI)
In your Program.cs, register the necessary services:
using AppXDev.Sync.Domain.Interfaces;
using AppXDev.Sync.Application.Services;
using AppXDev.Sync.Infrastructure.Persistence;
using AppXDev.Sync.Infrastructure.Messaging;
// 1. Database
builder.Services.AddDbContext<SyncDbContext>(options =>
options.UseSqlServer("YourConnectionString"));
// 2. Messaging (RabbitMQ)
builder.Services.AddSingleton<IMessageBroker, RabbitMqBroker>();
// 3. Sync Core Services
builder.Services.AddScoped<IChangeTracker, EfCoreChangeTracker>();
builder.Services.AddScoped<IConflictResolver, ConflictResolverService>();
builder.Services.AddScoped<ISyncEngine, SyncService>();
// 4. Manual Conflict Repository (Offline Mode)
builder.Services.AddScoped<ISyncConflictRepository, EfCoreSyncConflictRepository>();
3. Create a Store DbContext
3. Use Sync Service
using AppXDev.Sync.Application.Services;
// Pull changes from central
var pullResult = await syncService.PullAsync(new SyncContext(
StoreId: "STORE-001",
LastSyncTimestamp: lastSync
));
// Push local changes to central
var pushResult = await syncService.PushAsync(new SyncContext(
StoreId: "STORE-001",
LastSyncTimestamp: null
));
Packages
| Package | Description |
|---|---|
AppXDev.SyncEntityFramework |
Full SDK with all dependencies |
AppXDev.SyncEntityFramework.Domain |
Core entities and interfaces |
AppXDev.SyncEntityFramework.Application |
Business logic and sync services |
Requirements
- .NET 9.0 or later
- SQL Server (or compatible EF Core provider)
- RabbitMQ (optional, for real-time sync)
Documentation
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting pull requests.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- AppXDev.SyncEntityFramework.Application (>= 0.4.2)
- AppXDev.SyncEntityFramework.Domain (>= 0.4.2)
- AppXDev.SyncEntityFramework.Infrastructure (>= 0.4.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.