internal static EditableSite CreateEditableSite(CmsSite site) { var editableSite = Mapper.Map <CmsSite, EditableSite>(site); ShallowCopyProperties(site, editableSite); return(editableSite); }
private static void ShallowCopyProperties(CmsSite site, EditableSite editableSite) { var propertyItems = site.Property.Select(Mapper.Map <PropertyItem, PropertyItem>).ToList(); var propertyCollection = new PropertyCollection { Properties = propertyItems }; editableSite.Property = propertyCollection; }
private static void ShallowCopyProperties(CmsSite site, EditableSite editableSite) { var propertyItems = site.Property.Select(Mapper.Map<PropertyItem, PropertyItem>).ToList(); var propertyCollection = new PropertyCollection { Properties = propertyItems }; editableSite.Property = propertyCollection; }
internal static EditableSite CreateEditableSite(CmsSite site) { var editableSite = Mapper.Map<CmsSite, EditableSite>(site); ShallowCopyProperties(site, editableSite); return editableSite; }