Answered by:
Sync two database with EF 4.0

Question
-
Dear All,
I have a SQL Compact 3.5 on my client side.
I have a SQL 2005 on the server side that expose the DB using WCF Data Services.
Now, when I need to update the remote DB, I am inserting the new rows from local DB manually, creating a new EF instance from remote server and add manually each new row.
As the schema of the tables is 100% the same, I would like to know if there is a fast way to cast the local entity on the remote entity as this are same schema, and only the typed name change.....
Giuseppe
GiuseppeThursday, April 7, 2011 9:50 AM
Answers
-
The sample is here : http://code.msdn.microsoft.com/Database-Sync-SQL-Server-7e88adab, it does not incorporate the Entity Framework or WCF data service, which you can do outside of sync components on top of the tables to sync.
- Proposed as answer by Ann Tang [MSFT]Microsoft employee Thursday, April 21, 2011 10:16 PM
- Marked as answer by Giuseppe Porcelli Saturday, May 7, 2011 2:59 PM
Monday, April 11, 2011 5:15 PMAnswerer
All replies
-
Please clarify whether you are using Sync Provider to sync them.Thursday, April 7, 2011 11:59 PMAnswerer
-
No, I am not.
GiuseppeFriday, April 8, 2011 7:31 AM -
You could consider using Sync provider to sync them.Friday, April 8, 2011 5:24 PMAnswerer
-
Same samples?
GiuseppeSunday, April 10, 2011 5:48 AM -
The sample is here : http://code.msdn.microsoft.com/Database-Sync-SQL-Server-7e88adab, it does not incorporate the Entity Framework or WCF data service, which you can do outside of sync components on top of the tables to sync.
- Proposed as answer by Ann Tang [MSFT]Microsoft employee Thursday, April 21, 2011 10:16 PM
- Marked as answer by Giuseppe Porcelli Saturday, May 7, 2011 2:59 PM
Monday, April 11, 2011 5:15 PMAnswerer