Class PriceServiceDatabase
Represents database service to manipulate Entry prices.
Inheritance
Implements
Inherited Members
Namespace: Mediachase.Commerce.Pricing.Database
Assembly: Mediachase.Commerce.dll
Version: 10.8.0Syntax
public class PriceServiceDatabase : IPriceService
Constructors
PriceServiceDatabase(IChangeNotificationManager, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster, IApplicationContext, EntryIdentityResolver)
Creates a new instance of the PriceServiceDatabase class.
Declaration
public PriceServiceDatabase(IChangeNotificationManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext, EntryIdentityResolver identityResolver)
Parameters
Type | Name | Description |
---|---|---|
EPiServer.Events.ChangeNotification.IChangeNotificationManager | changeManager | The notification manager to notify when changes have been committed. |
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache | objectInstanceCache | The object instance cache. |
CatalogKeyEventBroadcaster | broadcaster | The class to broadcast price events. |
IApplicationContext | applicationContext | The application context |
EntryIdentityResolver | identityResolver | The identity resolver. |
PriceServiceDatabase(ICatalogSystem, IChangeNotificationManager)
Creates a new instance of the PriceServiceDatabase class.
Declaration
[Obsolete("This constructor is no longer used, use the one with EntryIdentityResolver instead. Will remain at least until Sept 2016.")]
public PriceServiceDatabase(ICatalogSystem catalogSystem, IChangeNotificationManager changeManager)
Parameters
Type | Name | Description |
---|---|---|
ICatalogSystem | catalogSystem | The catalog system, which will be used to get entry. |
EPiServer.Events.ChangeNotification.IChangeNotificationManager | changeManager | The notification manager to notify when changes have been committed. |
PriceServiceDatabase(ICatalogSystem, IChangeNotificationManager, ISynchronizedObjectInstanceCache)
Creates a new instance of the PriceServiceDatabase class.
Declaration
[Obsolete("This constructor is no longer used, use the one with EntryIdentityResolver instead. Will remain at least until Sept 2016.")]
public PriceServiceDatabase(ICatalogSystem catalogSystem, IChangeNotificationManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache)
Parameters
Type | Name | Description |
---|---|---|
ICatalogSystem | catalogSystem | The catalog system, which will be used to get entry. |
EPiServer.Events.ChangeNotification.IChangeNotificationManager | changeManager | The notification manager to notify when changes have been committed. |
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache | objectInstanceCache | The object instance cache. |
PriceServiceDatabase(ICatalogSystem, IChangeNotificationManager, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster)
Creates a new instance of the PriceServiceDatabase class.
Declaration
[Obsolete("This constructor is no longer used, use the one with EntryIdentityResolver instead. Will remain at least until October 2016.")]
public PriceServiceDatabase(ICatalogSystem catalogSystem, IChangeNotificationManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster)
Parameters
Type | Name | Description |
---|---|---|
ICatalogSystem | catalogSystem | The catalog system, which will be used to get entry. |
EPiServer.Events.ChangeNotification.IChangeNotificationManager | changeManager | The notification manager to notify when changes have been committed. |
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache | objectInstanceCache | The object instance cache. |
CatalogKeyEventBroadcaster | broadcaster | The class to broadcast price events. |
PriceServiceDatabase(ICatalogSystem, IChangeNotificationManager, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster, IApplicationContext)
Creates a new instance of the PriceServiceDatabase class.
Declaration
[Obsolete("This constructor is no longer used, use the one with EntryIdentityResolver instead. Will remain at least until Sept 2016.")]
public PriceServiceDatabase(ICatalogSystem catalogSystem, IChangeNotificationManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext)
Parameters
Type | Name | Description |
---|---|---|
ICatalogSystem | catalogSystem | The catalog system, which will be used to get entry. |
EPiServer.Events.ChangeNotification.IChangeNotificationManager | changeManager | The notification manager to notify when changes have been committed. |
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache | objectInstanceCache | The object instance cache. |
CatalogKeyEventBroadcaster | broadcaster | The class to broadcast price events. |
IApplicationContext | applicationContext | The application context |
PriceServiceDatabase(ICatalogSystem, IChangeNotificationManager, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster, IApplicationContext, EntryIdentityResolver)
Creates a new instance of the PriceServiceDatabase class.
Declaration
[Obsolete("This constructor is no longer used, use the one without ICatalogSystem instead. Will remain at least until May 2017.")]
public PriceServiceDatabase(ICatalogSystem catalogSystem, IChangeNotificationManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext, EntryIdentityResolver identityResolver)
Parameters
Type | Name | Description |
---|---|---|
ICatalogSystem | catalogSystem | The catalog system, which will be used to get entry. |
EPiServer.Events.ChangeNotification.IChangeNotificationManager | changeManager | The notification manager to notify when changes have been committed. |
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache | objectInstanceCache | The object instance cache. |
CatalogKeyEventBroadcaster | broadcaster | The class to broadcast price events. |
IApplicationContext | applicationContext | The application context |
EntryIdentityResolver | identityResolver | The identity resolver. |
Fields
priceDetailService
Declaration
public Injected<IPriceDetailService> priceDetailService
Field Value
Type | Description |
---|---|
EPiServer.ServiceLocation.Injected<IPriceDetailService> |
Properties
ConnectionStringFunction
Declaration
public static Func<string> ConnectionStringFunction { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.String> |
IsReadOnly
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
GetCatalogEntryPrices(CatalogKey)
Declaration
public IEnumerable<IPriceValue> GetCatalogEntryPrices(CatalogKey catalogKey)
Parameters
Type | Name | Description |
---|---|---|
CatalogKey | catalogKey |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPriceValue> |
GetCatalogEntryPrices(IEnumerable<CatalogKey>)
Gets catalog entry prices from the list of catalog key.
Declaration
public IEnumerable<IPriceValue> GetCatalogEntryPrices(IEnumerable<CatalogKey> catalogKeys)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CatalogKey> | catalogKeys | List of catalog key to get prices. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPriceValue> | Catalog entry prices. |
GetDefaultPrice(MarketId, DateTime, CatalogKey, Currency)
Declaration
public IPriceValue GetDefaultPrice(MarketId market, DateTime validOn, CatalogKey catalogKey, Currency currency)
Parameters
Type | Name | Description |
---|---|---|
MarketId | market | |
System.DateTime | validOn | |
CatalogKey | catalogKey | |
Currency | currency |
Returns
Type | Description |
---|---|
IPriceValue |
GetPrices(MarketId, DateTime, CatalogKey, PriceFilter)
Declaration
public IEnumerable<IPriceValue> GetPrices(MarketId market, DateTime validOn, CatalogKey catalogKey, PriceFilter filter)
Parameters
Type | Name | Description |
---|---|---|
MarketId | market | |
System.DateTime | validOn | |
CatalogKey | catalogKey | |
PriceFilter | filter |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPriceValue> |
GetPrices(MarketId, DateTime, IEnumerable<CatalogKey>, PriceFilter)
Declaration
public IEnumerable<IPriceValue> GetPrices(MarketId market, DateTime validOn, IEnumerable<CatalogKey> catalogKeys, PriceFilter filter)
Parameters
Type | Name | Description |
---|---|---|
MarketId | market | |
System.DateTime | validOn | |
System.Collections.Generic.IEnumerable<CatalogKey> | catalogKeys | |
PriceFilter | filter |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPriceValue> |
GetPrices(MarketId, DateTime, IEnumerable<CatalogKeyAndQuantity>, PriceFilter)
Declaration
public IEnumerable<IPriceValue> GetPrices(MarketId market, DateTime validOn, IEnumerable<CatalogKeyAndQuantity> catalogKeysAndQuantities, PriceFilter filter)
Parameters
Type | Name | Description |
---|---|---|
MarketId | market | |
System.DateTime | validOn | |
System.Collections.Generic.IEnumerable<CatalogKeyAndQuantity> | catalogKeysAndQuantities | |
PriceFilter | filter |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<IPriceValue> |
ReplicatePriceDetailChanges(IEnumerable<CatalogKey>, IEnumerable<IPriceValue>)
Declaration
public void ReplicatePriceDetailChanges(IEnumerable<CatalogKey> catalogKeys, IEnumerable<IPriceValue> priceValues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CatalogKey> | catalogKeys | |
System.Collections.Generic.IEnumerable<IPriceValue> | priceValues |
SetCatalogEntryPrices(CatalogKey, IEnumerable<IPriceValue>)
Declaration
public void SetCatalogEntryPrices(CatalogKey catalogKey, IEnumerable<IPriceValue> priceValues)
Parameters
Type | Name | Description |
---|---|---|
CatalogKey | catalogKey | |
System.Collections.Generic.IEnumerable<IPriceValue> | priceValues |
SetCatalogEntryPrices(IEnumerable<CatalogKey>, IEnumerable<IPriceValue>)
Declaration
public void SetCatalogEntryPrices(IEnumerable<CatalogKey> catalogKeys, IEnumerable<IPriceValue> priceValues)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<CatalogKey> | catalogKeys | |
System.Collections.Generic.IEnumerable<IPriceValue> | priceValues |