Beispiel #1
0
        protected void SetEntityODATA <TEntity>(string controllerName) where TEntity : class
        {
            string entityName = typeof(TEntity).Name;
            IWebApiControllerEndpoint controller = _httpClient.Configuration.EndPoints.Single(f => f.EndpointName.Equals(entityName, StringComparison.InvariantCultureIgnoreCase));

            controller.AddressName    = ODATA_ADDRESS_NAME;
            controller.ControllerName = controllerName;
        }
Beispiel #2
0
        private void SetEntityREST()
        {
            string entityName = typeof(T).Name;
            IWebApiControllerEndpoint controller = _clientConfiguration.EndPoints.Single(f => f.EndpointName.Equals(entityName, StringComparison.InvariantCultureIgnoreCase));

            controller.AddressName    = WebApiHttpClient.API_ADDRESS_NAME;
            controller.ControllerName = entityName;
        }