In my ASP.net MVC application i need to get the host of the application because I have to distinguish between multiple domains/instances.
In consideration of a good design and testability I do not want to get it like this:
public ViewResult Show(int id)
{
string host = Request.Url.Host;
....
}
Is there a possibility to "inject" it through the constructor.
What would be the cleanest solution for this problem?