London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Class PriceServiceDatabase

Represents database service to manipulate Entry prices.

Inheritance
System.Object
PriceServiceDatabase
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Pricing.Database
Assembly: Mediachase.Commerce.dll
Version: 13.30.0
Syntax
public class PriceServiceDatabase : IPriceService

Constructors

PriceServiceDatabase(IChangeNotificationManager, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster, IApplicationContext, EntryIdentityResolver)

Declaration
[Obsolete("Use the constructor with CatalogItemChangeNotifier instead. Will remain at least until November 2018.")]
public PriceServiceDatabase(IChangeNotificationManager changeNotifier, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext, EntryIdentityResolver identityResolver)
Parameters
Type Name Description
EPiServer.Events.ChangeNotification.IChangeNotificationManager changeNotifier
EPiServer.Framework.Cache.ISynchronizedObjectInstanceCache objectInstanceCache
CatalogKeyEventBroadcaster broadcaster
IApplicationContext applicationContext
EntryIdentityResolver identityResolver

PriceServiceDatabase(CatalogItemChangeManager, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster, IApplicationContext, EntryIdentityResolver)

Creates a new instance of the PriceServiceDatabase class.

Declaration
[Obsolete("Use the constructor with CatalogItemChangeNotifier instead. Will remain at least until November 2020.")]
public PriceServiceDatabase(CatalogItemChangeManager changeManager, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext, EntryIdentityResolver identityResolver)
Parameters
Type Name Description
CatalogItemChangeManager changeManager

The change 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(CatalogItemChangeNotifier, ISynchronizedObjectInstanceCache, CatalogKeyEventBroadcaster, IApplicationContext, EntryIdentityResolver)

Creates a new instance of the PriceServiceDatabase class.

Declaration
public PriceServiceDatabase(CatalogItemChangeNotifier changeNotifier, ISynchronizedObjectInstanceCache objectInstanceCache, CatalogKeyEventBroadcaster broadcaster, IApplicationContext applicationContext, EntryIdentityResolver identityResolver)
Parameters
Type Name Description
CatalogItemChangeNotifier changeNotifier

The change notifier 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

Implements

Extension Methods