Last active
September 8, 2015 16:43
-
-
Save mskutta/462fda8afbf9ddf96e75 to your computer and use it in GitHub Desktop.
Sitecore: Automatically Save Related Items using Glass Mapper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var service = new SitecoreService("master"); | |
var person = new Person(); | |
person.Name = "Mike Skutta"; | |
person.FirstName = "Mike"; | |
person.LastName = "Skutta"; | |
person.Education = new List<Education> { new Education | |
{ | |
Name = "University of Illinois", | |
School = "University of Illinois", | |
YearOfDegree = 1999, | |
Degree = "BS, Mechanical Engineering" | |
} | |
}; | |
using (new SecurityDisabler()) | |
{ | |
service.Create(<parent>, person); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment