Created
July 29, 2021 10:47
-
-
Save gerhart92/e9c329c51e566b0181e684b7d68fa407 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
private Family _family; | |
public virtual Family Family | |
{ | |
get | |
{ | |
if (_family != null) | |
{ | |
return _family; | |
} | |
GetItemByQueryOptions builder = new GetItemByQueryOptions(); | |
builder.Query = new Query("/Family"); | |
builder.Lazy = Glass.Mapper.LazyLoading. | |
builder.RelativeItem = Sitecore.Context.Database.GetItem(new ID(this.Id)); | |
return new RequestContext(new SitecoreService(Sitecore.Context.Database)).SitecoreService.GetItem<Family>(builder); | |
} | |
set | |
{ | |
this._family = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment