Hi
I've created multiple scopes to try and reduce the time to perform each synchronisation and make my app more responsive, however some tables are required in more than one scope.
For example, my Users scope syncs the Users and Departments tables before login so that the application knows if the current users has been assigned as a manager for a Department for that day.
My Departments scope also contains the Departments table as well as some others.
I noticed that when I first start the application the Users scope causes the whole Departments table to be uploaded and downloaded even though none of the rows have been changed (except by the synchronisation). Then when I sync the Departments scope the
whole departments table is uploaded and downloaded again.
When I provision the scopes I specify CreateOrUseExisting for stored procedures.
pv.SetCreateProceduresDefault(DbSyncCreationOption.CreateOrUseExisting);
pv.SetCreateProceduresForAdditionalScopeDefault(DbSyncCreationOption.CreateOrUseExisting);
I think I can re-arrange my scopes so that they don't overlap but I initially didn't want to make them too fine grained as I'm syncing over WCF. (I thought that less connections might would perform better than less but I have not profiled anything, this
was just my first attempt).