Inheritence of the Model

21 views
Skip to first unread message

Christian Kütbach

unread,
Nov 6, 2017, 2:20:17 AM11/6/17
to dotliquid
I am facing some problems with inherited classes:

        public class ModelDto : ModelParentDto
        {
            public string Value { get; set; }
        }

        public class ModelParentDto
        {
            public string ParentValue { get; set; }
        }

If I render var b = _unit.ParseView(model, "{{ParentValue}}-{{Value}}", Encoding.UTF8); (With values P and V I get "-V". The members of the baseclass are not rendered. 

In my Code I called 

Template.RegisterSafeType(ytpe, allMembersIGotWithReflection);

for both classes (ModelDto and ModelParentDto).



Christian

Reply all
Reply to author
Forward
0 new messages