fix
This commit is contained in:
parent
4f4ca4e948
commit
4ab0533d8b
@ -11,7 +11,7 @@ namespace ElectronicsShopContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IProductLogic
|
||||
{
|
||||
List<ProductViewModel>? ReadList(ProductSearchModel model);
|
||||
List<ProductViewModel>? ReadList(ProductSearchModel? model);
|
||||
ProductViewModel? ReadElement(ProductSearchModel model);
|
||||
|
||||
bool Create(ProductBindingModel model);
|
||||
|
@ -35,9 +35,6 @@
|
||||
<th>
|
||||
Сумма
|
||||
</th>
|
||||
<th>
|
||||
Статус оплаты
|
||||
</th>
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -40,7 +40,7 @@ namespace ElectronicsShopRestAPI.Controllers {
|
||||
[HttpGet]
|
||||
public List<ProductViewModel>? GetProducts() {
|
||||
try {
|
||||
return _product.ReadList(new ProductSearchModel {});
|
||||
return _product.ReadList(null);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
_logger.LogError(ex, $"Ошибка получения данных");
|
||||
|
@ -12,9 +12,11 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddTransient<IClientStorage, ClientStorage>();
|
||||
builder.Services.AddTransient<IEmployeeStorage, EmployeeStorage>();
|
||||
builder.Services.AddTransient<IProductStorage, ProductStorage>();
|
||||
|
||||
builder.Services.AddTransient<IClientLogic, ClientLogic>();
|
||||
builder.Services.AddTransient<IEmployeeLogic, EmployeeLogic>();
|
||||
builder.Services.AddTransient<IProductLogic, ProductLogic>();
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
|
Loading…
Reference in New Issue
Block a user