public CitationFactory(HttpRequestMessage request)
{
// Arrange.
var configuration = new HttpConfiguration();
request.Properties[System.Web.Http.Hosting.HttpPropertyKeys.HttpConfigurationKey] = configuration;
_urlHelper=new UrlHelper(request);
}
section.URL= _urlHelper.Link("DefaultApi", new { id = 1 });
I have created URLHelper to create link in asp.net webapi. But it is not working.
Aucun commentaire:
Enregistrer un commentaire