Create a Windows Service that calls an MVC

1

asked by anonymous 13.02.2018 / 19:21

1 answer

0

Your AwbController controller has a constructor:

public AwbController(IAwbApplication awbApplication, IMovimentoApplication movimentoApplication)
{
    _awbApplication = awbApplication;
    _movimentoApplication = movimentoApplication;
}

Then implement these two interfaces in your Windows Service class and try this:

 public void ExecutarRotina()
    {
        using (var awb = new AwbController(instanciaInterfaceIAwbApplication, instanciaInterfaceIMovimentoApplication))
        {
            awb.Index();
        }
    }
    
14.02.2018 / 18:03