public override object GetModel(Guid contactId)
        {
            Sitecore.XConnect.Contact contact = EPRepository.GetContact(contactId, SF.Foundation.Facets.FacetNames.UserSettings);
            var settings = contact.GetFacet <SF.Foundation.Facets.UserSettings>();

            if (settings != null)
            {
                return(new UserSettingsTabModel
                {
                    UserSettings = settings.Settings
                });
            }
            return(new UserSettingsTabModel());
        }
Exemple #2
0
 public static CompanyFacet Company(this Sitecore.XConnect.Contact c)
 {
     return(c.GetFacet <CompanyFacet>(CompanyFacet.DefaultFacetKey));
 }