Developer Resources for AbleCommerce eCommerce platform
CommerceBuilder.Catalog Namespace / ICategoryRepository Interface / LoadForName Method
The name of the category to locate.
Optionally specifies the parent category to search within. Pass -1 to search the entire catalog.
In This Topic
    LoadForName Method (ICategoryRepository)
    In This Topic
    Loads a category given the name.
    Syntax

    Parameters

    name
    The name of the category to locate.
    parentCategoryId
    Optionally specifies the parent category to search within. Pass -1 to search the entire catalog.

    Return Value

    A category instance if the named category is found. Returns null if the category does not exist.
    Remarks
    Case sensitivity of the search is determined by the database. If more than one matching category is found, only the first match is returned.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also