adoconnection / RazorEngineCore

.NET6 Razor Template Engine
MIT License
565 stars 84 forks source link

Support for init-only setters #123

Open hughesjs opened 1 year ago

hughesjs commented 1 year ago

Legacy RazorEngine.NetCore doesn't work if you've got init setters on your models. I strongly suspect it's just because it's using a very, very old code generator that doesn't understand them, but I've not verified that.

Is that supported in this project?

adoconnection commented 1 year ago

does this help? https://github.com/adoconnection/RazorEngineCore#strongly-typed-model

Making new model instance is on your side so I see no issues with init only properties