-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter not working #1256
Comments
Can you provide a quick repro sample, like a sql script that will create the database with some rows, and a bit of code to reproduce the error ? |
Sure, I made a complete example Run the Sync Database by Dotmin creating the filter by tennant. |
Thanks for the detailed sample, it's helping a lot, appreciate ! Can you try to remove the "dbo." in all your declaration, like replacing from this: var setup = new SyncSetup("dbo.Tennants", "dbo.Audios", "dbo.Led", "dbo.LedEffect");
setup.Tables["dbo.Tennants"].SyncDirection = SyncDirection.DownloadOnly;
setup.Tables["dbo.Audios"].SyncDirection = SyncDirection.DownloadOnly;
setup.Tables["dbo.Led"].SyncDirection = SyncDirection.DownloadOnly;
setup.Tables["dbo.LedEffect"].SyncDirection = SyncDirection.DownloadOnly; to this: var setup = new SyncSetup("Tennants", "Audios", "Led", "LedEffect");
setup.Tables["Tennants"].SyncDirection = SyncDirection.DownloadOnly;
setup.Tables["Audios"].SyncDirection = SyncDirection.DownloadOnly;
setup.Tables["Led"].SyncDirection = SyncDirection.DownloadOnly;
setup.Tables["LedEffect"].SyncDirection = SyncDirection.DownloadOnly; And make another test. |
Is it working as expected now ? |
Apparently the logic is simple and perfect, but I can't run the filter, it syncs but doesn't filter
I have several tables and I want to create a filter, where the tennantID column (FK) is equal to my GUID variable
ex:
Here the filters start:
I've already tried sending the DbType.Guid type as the TableName ("TennantId", "Audios");
Here I define the created parameter called TennantID for my C# variable _myTennantId
and at the end I execute:
var result = await agent.SynchronizeAsync(setup, parameters, progress);
Of course the code is much larger, error handling, etc., but I don't believe that this influences it.
It synchronizes all TennantIDs and not the one in my variable _myTennantId
The text was updated successfully, but these errors were encountered: