测试
This commit is contained in:
18
MinimalAPI/Repositories/IProductRepository.cs
Normal file
18
MinimalAPI/Repositories/IProductRepository.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using HardwarePerformance.Models;
|
||||
|
||||
namespace HardwarePerformance.Repositories
|
||||
{
|
||||
public interface IProductRepository : IRepository<Product>
|
||||
{
|
||||
Task<IEnumerable<Product>> GetByCategoryAsync(int categoryId);
|
||||
Task<IEnumerable<Product>> GetByCategoryAsync(int categoryId, int page, int pageSize, string sortBy = "CurrentRank", string sortOrder = "asc");
|
||||
Task<IEnumerable<Product>> SearchAsync(string query);
|
||||
Task<IEnumerable<Product>> SearchAsync(string query, int? categoryId = null, string? manufacturer = null, int? minScore = null, int? maxScore = null, int page = 1, int pageSize = 20);
|
||||
Task<IEnumerable<Product>> FilterAsync(int? categoryId, string? manufacturer, int? minScore, int? maxScore, int? year);
|
||||
Task<IEnumerable<Product>> FilterAsync(int? categoryId, string? manufacturer, int? minScore, int? maxScore, int? year, int page, int pageSize, string sortBy = "CurrentRank", string sortOrder = "asc");
|
||||
Task<int> CountAsync(int? categoryId = null);
|
||||
Task<int> CountSearchResultsAsync(string query, int? categoryId = null, string? manufacturer = null, int? minScore = null, int? maxScore = null);
|
||||
Task<int> CountFilterResultsAsync(int? categoryId, string? manufacturer, int? minScore, int? maxScore, int? year);
|
||||
Task<Category?> GetCategoryByProductIdAsync(int productId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user