I am trying to use EF4 with the SQLDependency object with not much luck.
I have created my own queue and service and want my WPF application to monitor this queue for data changes so that I can update the UI (opted for trying this rather than constantly querying the database).
Even though on application startup I call;
SqlDependency.Start(connectString, "NewResultAddedQueue");
My EF4 repository implementation throws an exception stating;
{"When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance."}
Firstly, am I trying to achieve something which is not possible with EF4 or is there another approach I can take to allow my application to listen for data changes from SQL 2005??