Giter Site home page Giter Site logo

workgroupengineering / dotmim.sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mimetis/dotmim.sync

0.0 2.0 0.0 22.73 MB

A brand new database synchronization, multi platform, multi databases, developed on top of .Net Standard 2.0. https://mimetis.github.io/Dotmim.Sync/

License: MIT License

C# 97.99% TSQL 2.01%

dotmim.sync's Introduction

DMS

NuGet version (Dotmim.Sync.Core) Build Status Documentation Status

See the Azure Devops CI : https://dev.azure.com/dotmim/Dotmim.Sync

Documentation

Read the full documentation on https://dotmimsync.readthedocs.io/

Dotmim.Sync

DotMim.Sync (DMS) is a straightforward framework for syncing relational databases, developed on top of .Net Standard 2.0, available and ready to use within IOT, Xamarin, .NET, UWP and so on :)

Multi Databases Cross Plaform .Net Standard 2.0

TL;DR

Here is the easiest way to create a first sync, from scratch :

// Sql Server provider, the "server" or "hub".
SqlSyncProvider serverProvider = new SqlSyncProvider(
    @"Data Source=.;Initial Catalog=AdventureWorks;Integrated Security=true;");

// Sqlite Client provider acting as the "client"
SqliteSyncProvider clientProvider = new SqliteSyncProvider("advworks.db");

// Tables involved in the sync process:
var setup = new SyncSetup("ProductCategory", "ProductDescription", "ProductModel", 
                          "Product", "ProductModelProductDescription", "Address", 
                          "Customer", "CustomerAddress", "SalesOrderHeader", "SalesOrderDetail");

// Sync agent
SyncAgent agent = new SyncAgent(clientProvider, serverProvider);

do
{
    var result = await agent.SynchronizeAsync(setup);
    Console.WriteLine(result);

} while (Console.ReadKey().Key != ConsoleKey.Escape);

And here is the result you should have, after a few seconds:

Synchronization done.
        Total changes  uploaded: 0
        Total changes  downloaded: 2752
        Total changes  applied: 2752
        Total resolved conflicts: 0
        Total duration :0:0:3.776

You're done !

Now try to update a row in your client or server database, then hit enter again. You should see something like that:

Synchronization done.
        Total changes  uploaded: 0
        Total changes  downloaded: 1
        Total changes  applied: 1
        Total resolved conflicts: 0
        Total duration :0:0:0.045

Yes it's blazing fast !

Need Help

dotmim.sync's People

Contributors

mimetis avatar symbiogenesis avatar wasimahmad avatar workgroupengineering avatar vunder avatar dependabot[bot] avatar kevindost avatar gentledepp avatar vaguegit avatar louisnowell-nicolle avatar davez69gto avatar hantse avatar vladislavantonyuk avatar tdoerfler avatar jawn avatar abderrahmaneahmam avatar slagtejn avatar inamg avatar eduard-bystrov avatar azure-pipelines[bot] avatar varamil avatar tonywarn avatar tbolon avatar kibao avatar kmgallahan avatar gb0o avatar svdsinner avatar craige avatar charristti avatar christianfrom avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.