Click or drag to resize
DiscountInfoProviderExtensionsGetBySite Method
Returns dataset of all discounts for specified site.

Namespace: CMS.Ecommerce
Assembly: CMS.Ecommerce (in CMS.Ecommerce.dll) Version: 13.0.131
Syntax
C#
public static ObjectQuery<DiscountInfo> GetBySite(
	this IDiscountInfoProvider discountInfoProvider,
	int siteId,
	bool onlyEnabled = false
)

Parameters

discountInfoProvider
Type: CMS.EcommerceIDiscountInfoProvider
Provider for DiscountInfo management.
siteId
Type: SystemInt32
Site ID
onlyEnabled (Optional)
Type: SystemBoolean
True - only enabled discounts are returned. False - both enabled and disabled discounts are returned.

Return Value

Type: ObjectQueryDiscountInfo

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IDiscountInfoProvider. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when discountInfoProvider is null.
See Also