111 lines
3.9 KiB
C#
111 lines
3.9 KiB
C#
using Nop.Core.Domain.Attributes;
|
|
|
|
namespace Nop.Services.Attributes;
|
|
|
|
/// <summary>
|
|
/// Represents an attribute service
|
|
/// </summary>
|
|
/// <typeparam name="TAttribute">Type of the attribute (see <see cref="BaseAttribute"/>)</typeparam>
|
|
/// <typeparam name="TAttributeValue">Type of the attribute value (see <see cref="BaseAttributeValue"/>)</typeparam>
|
|
public partial interface IAttributeService<TAttribute, TAttributeValue>
|
|
where TAttribute : BaseAttribute
|
|
where TAttributeValue : BaseAttributeValue
|
|
{
|
|
/// <summary>
|
|
/// Gets all attributes
|
|
/// </summary>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the attributes
|
|
/// </returns>
|
|
Task<IList<TAttribute>> GetAllAttributesAsync();
|
|
|
|
/// <summary>
|
|
/// Gets a attribute
|
|
/// </summary>
|
|
/// <param name="attributeId"> attribute identifier</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the attribute
|
|
/// </returns>
|
|
Task<TAttribute> GetAttributeByIdAsync(int attributeId);
|
|
|
|
/// <summary>
|
|
/// Inserts a attribute
|
|
/// </summary>
|
|
/// <param name="attribute"> attribute</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task InsertAttributeAsync(TAttribute attribute);
|
|
|
|
/// <summary>
|
|
/// Updates a attribute
|
|
/// </summary>
|
|
/// <param name="attribute"> attribute</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task UpdateAttributeAsync(TAttribute attribute);
|
|
|
|
/// <summary>
|
|
/// Deletes a attribute
|
|
/// </summary>
|
|
/// <param name="attribute"> attribute</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task DeleteAttributeAsync(TAttribute attribute);
|
|
|
|
/// <summary>
|
|
/// Gets attributes
|
|
/// </summary>
|
|
/// <param name="attributeIds">Attribute identifiers</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the attributes
|
|
/// </returns>
|
|
Task<IList<TAttribute>> GetAttributeByIdsAsync(int[] attributeIds);
|
|
|
|
/// <summary>
|
|
/// Deletes attributes
|
|
/// </summary>
|
|
/// <param name="attributes">Attributes</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task DeleteAttributesAsync(IList<TAttribute> attributes);
|
|
|
|
/// <summary>
|
|
/// Gets attribute values by attribute identifier
|
|
/// </summary>
|
|
/// <param name="attributeId">The attribute identifier</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the attribute values
|
|
/// </returns>
|
|
Task<IList<TAttributeValue>> GetAttributeValuesAsync(int attributeId);
|
|
|
|
/// <summary>
|
|
/// Gets a attribute value
|
|
/// </summary>
|
|
/// <param name="attributeValueId"> attribute value identifier</param>
|
|
/// <returns>
|
|
/// A task that represents the asynchronous operation
|
|
/// The task result contains the attribute value
|
|
/// </returns>
|
|
Task<TAttributeValue> GetAttributeValueByIdAsync(int attributeValueId);
|
|
|
|
/// <summary>
|
|
/// Inserts a attribute value
|
|
/// </summary>
|
|
/// <param name="attributeValue"> attribute value</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task InsertAttributeValueAsync(TAttributeValue attributeValue);
|
|
|
|
/// <summary>
|
|
/// Updates a attribute value
|
|
/// </summary>
|
|
/// <param name="attributeValue"> attribute value</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task UpdateAttributeValueAsync(TAttributeValue attributeValue);
|
|
|
|
/// <summary>
|
|
/// Deletes a attribute value
|
|
/// </summary>
|
|
/// <param name="attributeValue"> attribute value</param>
|
|
/// <returns>A task that represents the asynchronous operation</returns>
|
|
Task DeleteAttributeValueAsync(TAttributeValue attributeValue);
|
|
} |