Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Sync Framework 2.1 - Example project, write Provider, Change Tracking, Metadata

I found it hard to find an entry into the Sync Framework 2.1. Is there any good tutorial or sample project, that I could use?

My goal is the sync a client with .NET 4.5 & Microsoft SQL Server 2012 LocalDB with a Windows 2008 R2 server with Microsoft SQL Server 2012.

I'd like to know how to write a Synchronization Provider on client and server.

Is it right, that the Provider of the Sync Framework of the MS SQL Server dosn't support "Change Tracking"? Do I have to write my own Provider? How can a manage the "Metadata" of the server?

Thank you very much for your help!

like image 235
Manni Avatar asked Oct 22 '22 14:10

Manni


1 Answers

why do you have to write a custom sync provider? that' supported out of the box.

There are two types of the database sync providers in Sync Framework.

The first one is the older offline sync provider which out the box only supports SQL CE for the client side. The SQL Server side will work with SQL Change Tracking.

The second type is what's referred to as peer-to-peer or collaboration providers which supports synching between SQL CE, Express, LocalDB, Server and Azure SQL.

you dont have to look far for the tutorials, the documentation itself that get's installed with the framework has some already.

here's the online version: Tutorial: Synchronizing SQL Server and SQL Express

that should work in your scenario since the SqlSyncProvider works with SQL Server, Express, LocalDB and Azure SQL.

like image 144
JuneT Avatar answered Oct 25 '22 18:10

JuneT