public static void RegisterRouteTable(ODataServiceHostFactory serviceHostFactory) { var serviceTypes = GetAllServiceTypes(); Debug.Assert(serviceTypes.Length > 0, "serviceTypes.Length > 0"); foreach (var serviceType in serviceTypes) { var serviceName = GetServiceName(serviceType); var prefix = string.Format("api/{0}", serviceName).ToLower(); RouteTable.Routes.Add(new ServiceRoute(prefix, serviceHostFactory, serviceType)); } }
public ODataStartable(ILifetimeScope rootScope, ODataServiceHostFactory serviceHostFactory, RepositoryFactory repositoryFactory) { this.rootScope = rootScope; this.serviceHostFactory = serviceHostFactory; this.repositoryFactory = repositoryFactory; }