Class VariantGroupProductRelation
- Namespace
- Dynamicweb.Ecommerce.Variants
- Assembly
- Dynamicweb.Ecommerce.dll
Class represents the variant group to product relation
[Serializable]
public class VariantGroupProductRelation
- Inheritance
-
VariantGroupProductRelation
- Inherited Members
Constructors
VariantGroupProductRelation()
Initializes a new instance of the class.
public VariantGroupProductRelation()
VariantGroupProductRelation(IDataReader)
Initializes a new instance of the class.
[Obsolete("Use VariantGroupService instead.")]
public VariantGroupProductRelation(IDataReader dataReader)
Parameters
dataReader
IDataReader- The data reader.
VariantGroupProductRelation(string)
Initializes a new instance of the class.
[Obsolete("Use VariantGroupService instead.")]
public VariantGroupProductRelation(string productId)
Parameters
productId
string
VariantGroupProductRelation(string, string)
Initializes a new instance of the class.
[Obsolete("Use VariantGroupService instead.")]
public VariantGroupProductRelation(string productId, string variantGroupId)
Parameters
Properties
Id
Gets or sets the id
public string Id { get; set; }
Property Value
ProductId
Gets or sets the product id
public string ProductId { get; set; }
Property Value
Sorting
Gets or sets the sorting order
public int Sorting { get; set; }
Property Value
VariantGroupId
Gets or sets the variant group id
public string VariantGroupId { get; set; }
Property Value
VariantGroups
Gets the variant groups
[Obsolete]
public IList<VariantGroup> VariantGroups { get; }
Property Value
Methods
Delete()
Deletes this instance.
[Obsolete("Use VariantGroupService instead.")]
public void Delete()
Delete(ProductCollection)
Deletes instances with the specified parameters.
[Obsolete("Use VariantGroupService.DeleteProductRelations(IEnumerable<Product>) instead.")]
public CommandBuilder Delete(ProductCollection products)
Parameters
products
ProductCollection- The ProductCollection.
Returns
Delete(ProductCollection, bool)
Deletes instances with the specified parameters.
[Obsolete("Use VariantGroupService instead.")]
public CommandBuilder Delete(ProductCollection products, bool execute)
Parameters
products
ProductCollection- The ProductCollection.
execute
bool- If
True
deletes will executed
Returns
Delete(string, string, string)
Deletes instances with the specified parameters.
[Obsolete("Use VariantGroupService instead.")]
public static void Delete(string productId, string groupId = "", string relationId = "")
Parameters
Fill(IDataReader)
Fills the object with data from the specified data reader.
[Obsolete("Use VariantGroupService instead.")]
public void Fill(IDataReader dataReader)
Parameters
dataReader
IDataReader- The data reader.
GetProductRelations(VariantGroup)
Gets the relations.
[Obsolete("Use VariantGroupService instead.")]
public static IEnumerable<VariantGroupProductRelation> GetProductRelations(VariantGroup variantGroup)
Parameters
variantGroup
VariantGroup- The VariantGroup.
Returns
- IEnumerable<VariantGroupProductRelation>
- The collection of the VariantGroupProductRelation.
GetProductRelations(VariantGroup, string)
Gets the relations.
[Obsolete("Use VariantGroupService instead.")]
public static IEnumerable<VariantGroupProductRelation> GetProductRelations(VariantGroup variantGroup, string productId)
Parameters
variantGroup
VariantGroup- The VariantGroup.
productId
string- The product id.
Returns
- IEnumerable<VariantGroupProductRelation>
- The collection of the VariantGroupProductRelation.
GetProductRelations(string)
Gets the relations.
[Obsolete("Use VariantGroupService instead.")]
public static IEnumerable<VariantGroupProductRelation> GetProductRelations(string productId)
Parameters
productId
string- The product id.
Returns
- IEnumerable<VariantGroupProductRelation>
- The collection of the VariantGroupProductRelation.
GetVariantGroups()
Gets the variant groups.
[Obsolete("Use VariantGroup.Translations to get translated values.")]
public IList<VariantGroup> GetVariantGroups()
Returns
Save(string, string)
Saves this instance.
[Obsolete("Use VariantGroupService.Save(VariantGroupProductRelation) instead.")]
public void Save(string productId, string variantGroupId)
Parameters
VariantGroupCounter(string)
Gets the product relations count.
[Obsolete("Use VariantGroupService instead.")]
public int VariantGroupCounter(string productId)
Parameters
productId
string- The product.
Returns
- int
- Count of the relations.