Guest User

Untitled

a guest
Jan 19th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest)]
  2. public IQueryable<Foo> GetFoos(int param1, DateTime param2, string param3)
  3. {
  4. return CurrentDataSource.GetFoos(param1, param2, param3).AsQueryable();
  5. }
  6.  
  7. config.SetServiceOperationAccessRule("GetFoos", ServiceOperationRights.AllRead);
  8.  
  9. [WebInvoke(Method = "POST")]
  10. public IQueryable<string> GetFoos()
  11. {
  12. List<string> foos = new List<string>();
  13. foos.Add("bar");
  14. return foos.AsQueryable();
  15. }
Add Comment
Please, Sign In to add comment