public static void RegisterRestfulObjectsRoutes(RouteCollection routes) { if (NakedObjectsRunSettings.RestRoot != null) { RestfulObjectsControllerBase.AddRestRoutes(routes, NakedObjectsRunSettings.RestRoot); } }
public static void RegisterRoutes(RouteCollection routes) { RestfulObjectsControllerBase.AddRestRoutes(routes); // to make whole application 'read only' //RestfulObjectsControllerBase.IsReadOnly = true; // to configure domain model options //RestfulObjectsControllerBase.DomainModel = RestControlFlags.DomainModelType.Selectable; //or Simple, Formal, None //to enforce concurrency checking //RestfulObjectsControllerBase.ConcurrencyChecking = true; // to change cache settings (transactional, user, non-expiring) where 0 = no-cache // 0, 3600, 86400 are the defaults //RestfulObjectsControllerBase.CacheSettings = new Tuple<int, int, int>(0, 3600, 86400); // to set KeySeparator (for multi-part keys) defaults to "-" //RestfulObjectsControllerBase.KeySeparator = "-"; // make Accept header handling non-strict (RO spec 2.4.4) //RestfulObjectsControllerBase.AcceptHeaderStrict = false; // to change the size limit on returned collections. The default value is 20. Specifying 0 means 'unlimited'. //RestfulObjectsControllerBase.DefaultPageSize = 50; }
public static void RegisterRestfulObjectsRoutes(RouteCollection routes) { if (RestRoot != null) { RestfulObjectsControllerBase.AddRestRoutes(routes, RestRoot); } }
public static void RegisterRoutes(RouteCollection routes) { RestfulObjectsControllerBase.AddRestRoutes(routes); // to make whole application 'read only' //RestfulObjectsControllerBase.IsReadOnly = true; // to configure domain model options //RestfulObjectsControllerBase.DomainModel = RestControlFlags.DomainModelType.Selectable; //or Simple, Formal, None //to enforce concurrency checking //RestfulObjectsControllerBase.ConcurrencyChecking = true; // to change cache settings (transactional, user, non-expiring) where 0 = no-cache // 0, 3600, 86400 are the defaults //RestfulObjectsControllerBase.CacheSettings = new Tuple<int, int, int>(0, 3600, 86400); }