MRamesh wrote:
Thanks for your update. How can I do it in selfservicing Sql server component?
That's a little tricky, though it's possible. (not tested, but it should work).
Derive a class from the entitycollection class you need dependency for, like CustomerCollection.
Derive a class from the DAO class of the entity of the entitycollection class, here CustomerDAO.
Override CreateDAOInstance in CustomerCollection to create an instance of your derived customerdao instance.
in CustomerDAO override ExecuteMultiRowRetrievalQuery and create your SqlDependency there from the Command in the passed in IRetrievalQuery. Then pass everything on to the base method.