/// <summary> /// Get an item using the generic content repository /// </summary> /// <returns>The Hero datasource item from the Content API</returns> public IHero GetHeroItems() { var dataSource = _renderingRepository.GetDataSource(); // Basic example of using the wrapped logger if (string.IsNullOrEmpty(dataSource)) { _logRepository.Warn(Logging.Error.DataSourceError); } return(_contentRepository.GetContentItem <IHero>(dataSource)); }
/// <summary> /// Get an item using the generic content repository /// </summary> /// <returns>The Hero datasource item from the Content API</returns> public IHero GetHeroItems() { var dataSource = _renderingRepository.GetDataSource(); return(_contentRepository.GetContentItem <IHero>(dataSource)); }