Last active
May 29, 2016 11:40
-
-
Save soen/f486252d0537ae081134fa22a0ae8f3b to your computer and use it in GitHub Desktop.
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
SiteContext targetSiteContext = SiteContext.GetSite(sitename); | |
using (var context = new SiteContextSwitcher(targetSiteContext)) | |
{ | |
// do something on the new site context | |
Item myItem = context.Database.GetItem("ID"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment