Class MarketTypeHandler
Handler making IMarket implementations beeing stored as string in DDS.
Inheritance
Implements
Inherited Members
Namespace: EPiServer.Commerce.TypeHandlers
Assembly: EPiServer.Business.Commerce.dll
Version: 13.30.0Syntax
public class MarketTypeHandler : ITypeHandler
Constructors
MarketTypeHandler()
Initializes a new instance of the MarketTypeHandler class.
Declaration
public MarketTypeHandler()
MarketTypeHandler(IMarketService)
Initializes a new instance of the MarketTypeHandler class.
Declaration
public MarketTypeHandler(IMarketService marketService)
Parameters
Type | Name | Description |
---|---|---|
IMarketService | marketService | The market service |
Methods
FromDatabaseFormat(String, Object, Type, Type)
Returns an IMarket instance from the database format.
Declaration
public object FromDatabaseFormat(string propertyName, object propertyValue, Type targetType, Type ownerType)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Name of the property. |
System.Object | propertyValue | The property value. |
System.Type | targetType | Type of the target. |
System.Type | ownerType | Type of the owner. |
Returns
Type | Description |
---|---|
System.Object | A IMarket instance |
MapToDatabaseType(Type)
Returns the database type as string.
Declaration
public Type MapToDatabaseType(Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The type. |
Returns
Type | Description |
---|---|
System.Type | The type that is stored in database |
ToDatabaseFormat(String, Object, Type)
Returns the MarketId value in the database format.
Declaration
public object ToDatabaseFormat(string propertyName, object propertyValue, Type ownerType)
Parameters
Type | Name | Description |
---|---|---|
System.String | propertyName | Name of the property. |
System.Object | propertyValue | The property value. |
System.Type | ownerType | Type of the owner. |
Returns
Type | Description |
---|---|
System.Object | The market id value |