I am attempting to use IConfigurations to create a connectionstring:
public class ShippingRequestController: Controller
{
private readonly IConfiguration Configuration;
public ShippingRequestController(IConfiguration _configuration)
{
Configuration = _configuration;
}
}
And get the connection string by
Configuration.GetConnectionString("ShipRequestDBString")
This works well, however I need to create an instance of this controller in a separate controller and I don't know what to use for the IConfiguration parameter or if that is even possible.
ShippingRequestController mySRControl = new ShippingRequestController(WHAT DO I PUT HERE);