Interface IProductProvider
- Namespace
- CMS.Plugin.ProductManagement.Abstractions
- Assembly
- CMS.Plugin.ProductManagement.Abstractions.dll
产品提供程序
public interface IProductProvider
Methods
CreateAsync(ProductModel)
创建产品.
Task<ProductModel> CreateAsync(ProductModel product)
Parameters
product
ProductModel
Returns
FindAsync(Guid, bool, CancellationToken)
获取产品
Task<ProductModel?> FindAsync(Guid productId, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
productId
Guid产品id
includeDetails
boolif set to
true
[include details].cancellationToken
CancellationTokenThe cancellation token.
Returns
FindByIdentificationCodeAsync(string, bool, CancellationToken)
获取产品
Task<ProductModel?> FindByIdentificationCodeAsync(string identificationCode, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
identificationCode
string产品识别码
includeDetails
boolif set to
true
[include details].cancellationToken
CancellationTokenThe cancellation token.
Returns
FindByModelAsync(string, bool, CancellationToken)
获取产品
Task<ProductModel?> FindByModelAsync(string productModel, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
productModel
string产品型号
includeDetails
boolif set to
true
[include details].cancellationToken
CancellationTokenThe cancellation token.
Returns
FindByNameAsync(string, bool, CancellationToken)
获取产品
Task<ProductModel?> FindByNameAsync(string productName, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
productName
string产品名称
includeDetails
boolif set to
true
[include details].cancellationToken
CancellationTokenThe cancellation token.
Returns
GetListAsync(QueryProductRequest?, bool, CancellationToken)
获取产品列表
Task<PagedResult<ProductModel>> GetListAsync(QueryProductRequest? input = null, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
input
QueryProductRequest输入
includeDetails
boolif set to
true
[include details].cancellationToken
CancellationTokenThe cancellation token.
Returns
GetListAsync(IEnumerable<Guid>, bool, CancellationToken)
获取产品列表
Task<List<ProductModel>> GetListAsync(IEnumerable<Guid> productIds, bool includeDetails = false, CancellationToken cancellationToken = default)
Parameters
productIds
IEnumerable<Guid>产品id集合
includeDetails
boolif set to
true
[include details].cancellationToken
CancellationTokenThe cancellation token.
Returns
UpdateAsync(ProductModel)
更新产品.
Task<ProductModel> UpdateAsync(ProductModel product)
Parameters
product
ProductModel