Is there a way to host Razor pages in console application using ServiceTask?

后端 未结 1 1278
自闭症患者
自闭症患者 2021-01-06 19:37

I\'m trying to make a console application to expose JSON services. In addition I\'d like to host html and js pages to use them. I put the *.md (even *.htm) files into Views

相关标签:
1条回答
  • 2021-01-06 19:55

    You might be interested in the Razor Rockstars Console Application that uses embedded resource MVC Razor views that work with (or without) existing ServiceStack web services.

    i.e. the example project shows the 3 different ways to host MVC Razor pages in ServiceStack:

    1. Service/Controller and Model - Using the Response DTO from the Web Service as a view model
    2. No Service/Controller - Directly using the Request DTO as the view model
    3. No Service/Controller or Model - Directly by using a dynamic view model
    0 讨论(0)
提交回复
热议问题