Umbraco Juno, RestExtension and RestExtensionMethod attribute


/ Published in: C#
Save to your folder(s)

new in umbraco Juno, RestExtension and RestExtensionMethod attribute, no more need to update the restExtension.config file but simply mark type and methods...
(rest extensions are used for umbraco base)


Copy this code and paste it in your HTML
  1. [RestExtension("myAlias")]
  2. public class Test
  3. {
  4. [RestExtensionMethod]
  5. public static string HelloWorld()
  6. {
  7. return "Hello world";
  8. }
  9. [RestExtensionMethod(allowAll=false , allowGroup="custom")]
  10. public static string AnotherWithPermissions()
  11. {
  12. return "Hello member in custom group";
  13. }
  14.  
  15. }

URL: http://umbraco.org

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.