Esempio n. 1
0
 public ODataRoute(string routeTemplate, ODataConfiguration configuration) :
     base(routeTemplate)
 {
     Configuration = configuration;
 }
Esempio n. 2
0
        public static void MapODataRout(this HttpRouteCollection routes, string name, string routePrefix, ODataConfiguration configuration)
        {
            var routeTemplate = Constants.ODataRouteTemplate;

            if (!string.IsNullOrEmpty(routePrefix) && !string.IsNullOrWhiteSpace(routePrefix))
            {
                routeTemplate = routePrefix.TrimEnd('/', '\\') + "/" + routeTemplate;
            }
            var route = new ODataRoute(routeTemplate, configuration);

            configuration.Initialize();
            routes.Add(name, route);
        }