Create Method (CatalogSiteAgent)
Creates an instance of the CatalogContext object from the specified site agent.
Namespace: Microsoft.CommerceServer.Catalog
Assembly: Microsoft.CommerceServer.Catalog (in Microsoft.CommerceServer.Catalog.dll)
Syntax
'Declaration
Public Shared Function Create ( _
catalogSiteAgent As CatalogSiteAgent _
) As CatalogContext
'Usage
Dim catalogSiteAgent As CatalogSiteAgent
Dim returnValue As CatalogContext
returnValue = CatalogContext.Create(catalogSiteAgent)
public static CatalogContext Create(
CatalogSiteAgent catalogSiteAgent
)
public:
static CatalogContext^ Create(
CatalogSiteAgent^ catalogSiteAgent
)
public static function Create(
catalogSiteAgent : CatalogSiteAgent
) : CatalogContext
Parameters
- catalogSiteAgent
Type: Microsoft.CommerceServer.Catalog..::.CatalogSiteAgent
A CatalogSiteAgent which specifying the options used to construct a new CatalogContext object.
Return Value
Type: Microsoft.CommerceServer.Catalog..::.CatalogContext
An instance of the CatalogContext object.
Remarks
The CatalogContext class contains the functionality to manage the catalog and inventory systems.
Examples
This example creates a CatalogContext object.
public static void CreateCatalogContext()
{
// Create a CatalogSiteAgent to connect to the database.
CatalogSiteAgent catalogSiteAgent = new CatalogSiteAgent();
catalogSiteAgent.SiteName = "CSharpSite";
// Create a CatalogContext.
CatalogContext context = CatalogContext.Create(catalogSiteAgent);
}
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.CommerceServer.Catalog Namespace