Could not find a data mapper to handle property AbstractPropertyConfiguration Property: Applications Type: Data.Models.Sitecore.Templates.UserDefined.Pages.SolutionPage Assembly: Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=nullDescription: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: Glass.Mapper.MapperException: Could not find a data mapper to handle property AbstractPropertyConfiguration Property: Applications Type: Data.Models.Sitecore.Templates.UserDefined.Pages.SolutionPage Assembly: Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
public partial class SolutionPage{[SitecoreField(FieldName = ISectionPageConstants.PageAssetFieldName)]public MediaFile PageAssetMedia { get; set; }[SitecoreQuery("./*/*", IsRelative = true)]public IEnumerable<ICategoryPage> Categories { get; set; }[SitecoreQuery("./*/*[@@templatename='ApplicationPage']", IsRelative = true)]public List<ApplicationPage> Applications { get; set; }[SitecoreQuery("./*/*[@@templatename='ProductLinePage']", IsRelative = true)]public List<ProductLinePage> ProductLines { get; set; }}
<h3>Applications</h3><ul>@foreach (var item in Model.Applications){<li>@item.NavigationTitle</li>}</ul>
--
You received this message because you are subscribed to the Google Groups "Glass.Sitecore.Mapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email to glasssitecorema...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
public partial interface ISolutionPage{IEnumerable<IApplicationPage> Applications { get; set; }IEnumerable<IProductLinePage> ProductLines { get; set; }
}public partial class SolutionPage{[SitecoreField(FieldName = ISectionPageConstants.PageAssetFieldName)]public MediaFile PageAssetMedia { get; set; }[SitecoreQuery("./*/*", IsRelative = true)]public IEnumerable<ICategoryPage> Categories { get; set; }
public IEnumerable<IApplicationPage> Applications { get; set; }public IEnumerable<IProductLinePage> ProductLines { get; set; }public SolutionPage(){var context = new SitecoreContext();Applications =context.QueryRelative<IApplicationPage>("./*/*[@@templateid='{533670B4-BA56-4AD9-9840-7E34E1E0ED94}']",true, true);ProductLines =context.QueryRelative<IProductLinePage>("./*/*[@@templateid='{F183AD73-9DE6-4035-99EE-446166D94A6D}']",true, true);}}
public partial interface ISolutionPage{[SitecoreQuery("./*/*[@@templateid='{533670B4-BA56-4AD9-9840-7E34E1E0ED94}']", InferType = true, IsLazy = true,IsRelative = true)]
IEnumerable<IApplicationPage> Applications { get; set; }
[SitecoreQuery("./*/*[@@templateid='{F183AD73-9DE6-4035-99EE-446166D94A6D}']", InferType = true, IsLazy = true,IsRelative = true)]
IEnumerable<IProductLinePage> ProductLines { get; set; }}public partial class SolutionPage{[SitecoreField(FieldName = ISectionPageConstants.PageAssetFieldName)]public MediaFile PageAssetMedia { get; set; }[SitecoreQuery("./*/*", IsRelative = true)]public IEnumerable<ICategoryPage> Categories { get; set; }
[SitecoreQuery("./*/*[@@templateid='{533670B4-BA56-4AD9-9840-7E34E1E0ED94}']", InferType = true, IsLazy = true,IsRelative = true)]public virtual IEnumerable<IApplicationPage> Applications { get; set; }[SitecoreQuery("./*/*[@@templateid='{F183AD73-9DE6-4035-99EE-446166D94A6D}']", InferType = true, IsLazy = true,IsRelative = true)]public virtual IEnumerable<IProductLinePage> ProductLines { get; set; }}