public ODataRoute(string routeTemplate, ODataConfiguration configuration) : base(routeTemplate) { Configuration = configuration; }
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); }