It sounds like you are experiencing issues with data synchronization from the Member database to the Hub database in Azure SQL Data Sync. Here are some things you can verify:
- Check for Circular References: Ensure that there are no circular references in your sync groups, as these can cause sync issues. Any row that is synced by one sync group should not be synced by another.
- Primary Key Requirement: Verify that all tables involved in the sync have a primary key defined. If the primary key is changed, it can lead to data loss or sync failures.
- Data Types and Constraints: Make sure that the data types of the columns being synced are compatible and that there are no constraints (like CHECK constraints) that could prevent the data from being inserted into the Hub database.
- Sync Status: Check the status of your sync group in the Azure portal. If it is in a processing state, it may need to be reset. You can create a post in the Microsoft Q&A question page for Azure SQL Database to have the sync group status reset.
- SQL Trace: Since you mentioned that you see an insert query in the SQL trace, ensure that the insert operation is not being blocked by any triggers or constraints in the Hub database that might prevent the data from being updated.
- Manual Testing: If possible, try to manually insert data into the Hub database to confirm that it can accept data without issues. This can help isolate whether the problem is with the .NET application or with the sync configuration itself.
- EF Configuration: Review your Entity Framework configuration to ensure that it is set up correctly to handle the data sync operations. Sometimes, the way EF manages context and transactions can affect how data is sent to the database.
By checking these areas, you may be able to identify the root cause of the synchronization issue you are experiencing.
References: