3
public static async Task<IActionResult> Run()
{
    return data != null
    ? (ActionResult)new OkObjectResult($"Current-Temperature, {data.Current.Temperature}")
    : new BadRequestObjectResult("Please pass a name on the query string or in the request 
    body");
}

Here I am returning a value like string or a int.But I need to return a Razor Page. In templates I am unable to find the Razor Page instead its showing HTML Page and other templates. Can anyone help me out with this issue?

Iñigo
  • 1,877
  • 7
  • 25
  • 55
rishi raj
  • 83
  • 3
  • 10
  • Duplicate of: https://stackoverflow.com/questions/47766965/how-to-add-razor-view-file-in-azure-function -- you can try reviewing the blog post mentioned in that response: http://www.luckenuik.net/hosting-your-aspnet-core-razor-pages-inside-azure-functions/ – Bryan Lewis Jan 23 '20 at 18:25
  • 1
    Does this answer your question? [How to add razor view file in Azure function?](https://stackoverflow.com/questions/47766965/how-to-add-razor-view-file-in-azure-function) – Bryan Lewis Jan 23 '20 at 18:27
  • Not Exactly. @Bryan Lewis – rishi raj Jan 25 '20 at 12:16

0 Answers0