public static MyContext AppendPageInfos(this MyContext context, ViewContext viewContext) { var theGroup = context.GetOrCreate(context.GetGroupName_PageInfos()); var myPageInfo = viewContext.CreateMyPageInfo(); theGroup.Items[viewContext.View.Path] = myPageInfo.ToJson(); return(context); }