Handling boolean values with Engine.Razor.RunCompile()
Opened this issue · 0 comments
vkso4 commented
Hi,
I am getting unexpected results when dealing with boolean values in model. Here is the code:
string template1 = @"
<add key=""Retired"" value=""@(Model.Details.IsRetired)"" />
";
var model1 = new Person { Forename = "Matt", Surname = "Willander", Age = 25, Details = new Details { IsRetired = true } };
string result = Engine.Razor.RunCompile(template1, "key", typeof(Person), model1);
The results id :
but I expect it to be:
What do I need to fix it?
Thank you.