Can i use / move an MVC Controller as Azure Function

Viewed 201

When i have an MVC Controller the return type is an IActionResult

public IActionResult Index(){
        return View();
    }

For a simple Azure Function i could return Task<IActionResult>. So can i move an MVC Controller to an Azure Function?

I think it's not possible to return a ViewResult from an Azure Function is this correct?

1 Answers

From an azure function you can return anything, but the issue is that your View is embedded in the MVC engine, so in pure azure function it will not work as you might expect

Related