Where and Join

Sep 25, 2016 at 6:56 PM
Hi. Any plans regarding the ability to listen to a query like in sql dependency and the get the actual change like here in table dependency? I guess performance is the reason why it's not possible yet. But do you have any idea about the performance situation having to do those filters after you get the change event, like I need to do now: I have a large table where I only need to listen to maybe 1% of the rows. But I really do need to get the exact change, so Table Dependency was my choice, even though I need to look into every event and see if's in that 1%. Would such a functionality be that difficult to include in this library, it's just a check on a column, and what would the difference be in performance? The work is just done somewhere.

Thanks in advance.
Coordinator
Sep 26, 2016 at 7:05 PM
Edited Sep 26, 2016 at 7:05 PM
Hi

If you mean a "WHERE" statement like:
var filter = new ModelToTableMapper<Customer>();
filter.AddCondition(c => c.Name == "Bred Pit");

string conStr = ConfigurationManager.ConnectionStrings["db"].ConnectionString;
        using (var depedency = new SqlTableDependency<Customer>(conStr, "Customers", filter))
        {
            depedency.OnChanged += Depedency_OnChanged;
            depedency.Start();

            Console.WriteLine("Waiting for receiving notifications...");
            Console.WriteLine("Press a key to stop");
            Console.ReadKey();
        }
There was a plan to implement it but it was postponed to non defined date.

Bye
Sep 26, 2016 at 7:52 PM
Thank you very much for the response. I look forward to see this happen, some day :)