[These code snippets are based on features in the SP1 RTM release, Read about it here : RTM is here! ]
Quite a few times, I forget the syntax for certain tasks while Creating a Data Service . To avoid remembering the syntax, I came up with a couple of Code Snippets that I use for Query Interceptors and Change Interceptors. You can download the Code Snippets Here [Edit : Alternate download link at the bottom of the post .]
1) Copy the above files into the %systemDrive%:\Users\<UserName>\Documents\Visual Studio 2008\Code Snippets\Visual C#\My Code Snippets folder.
2) Open Visual Studio and open the .SVC.CS file for the Data Service. Using the Query Interceptors Snippet
1. Type in qi and press tab twice
2. Fill in the EntitySet Name for the Query Interceptor
Using the Change Interceptors Snippet
1. Type in ci and press tab twice
In a future post , I will share the Client Code Snippets that I use for common Client Tasks with the astoria client library.
PingBack from http://www.easycoded.com/code-snippets-for-common-tasks-in-adonet-data-services
You've been kicked (a good thing) - Trackback from DotNetKicks.com
We can't download the snippet because the company I work at blocks Skydrive. Can you make it a CodePlex project?
Hi David,
I posted an alternate download link at the bottom of the post. Regarding making this a codeplex project,
at the moment , I dont think I will be able to dedicate any time to maintaining a codeplex project .
Once time frees up , I will put this and other samples up on codeplex .
-Phani