Skip to content

Successfully compiling invalid razor #486

Answered by jzabroski
gt5700 asked this question in Q&A
Discussion options

You must be logged in to vote

I don't see a @model Type expression here, like this cshtml file in the tests folder hierarchy:

https://github.com/toddams/RazorLight/blob/master/tests/RazorLight.Tests/Assets/Files/Partial.cshtml

If they're saving template files to the database without typed models, then I guess your validation is a bit simple.

It would be pretty cool if you shared the full example and contributed it back to the project, as others could probably benefit and improve upon it. For example, ideally you'd use OmniSharp https://github.com/OmniSharp/omnisharp-roslyn and BlazorWASM client-side to get deep intellisense support. It might slow down typing responsiveness, though.

But, it would be pretty powerful. Yo…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gt5700
Comment options

@jzabroski
Comment options

Answer selected by jzabroski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants