AI OnAI Off
It seems it was my bad to remove the entire class. The GetCategories can be reimplemented as below
private static readonly Lazy<IRelationRepository> _relationRepository = new Lazy<IRelationRepository>(() => ServiceLocator.Current.GetInstance<IRelationRepository>());
/// <summary>
/// Gets the categories to which the category is linked (parent categories).
/// N.B. This does not include the main parent category (given by the ParentLink of the content).
/// </summary>
/// <param name="node">The node.</param>
/// <returns>
/// <see cref="ContentReference" />s of the parent categories.
/// </returns>
public static IEnumerable<ContentReference> GetCategories(this NodeContent node)
{
return GetCategories(node, _relationRepository.Value);
}
/// <summary>
/// Gets the categories to which the category is linked (parent categories).
/// N.B. This does not include the main parent category (given by the ParentLink of the content).
/// </summary>
/// <param name="node">The node.</param>
/// <param name="relationRepository">The relation repository.</param>
/// <returns>
/// <see cref="ContentReference" />s of the parent categories.
/// </returns>
public static IEnumerable<ContentReference> GetCategories(this NodeContent node, IRelationRepository relationRepository)
{
Validator.ThrowIfNull("node", node);
Validator.ThrowIfNull("relationRepository", relationRepository);
return relationRepository.GetParents<NodeRelation>(node.ContentLink).Select(r => r.Parent);
}
Hi team,
I have updated my episerver commerce to 13.7.1 version and the NodeContentExtensions class is removed.
In my solution i have used GetCategories() method (from NodeContentExtensions). Can you please suggest me a alternative for this.
Thanks in Advance.