исправление/комментирование ошибок

This commit is contained in:
the 2024-06-24 10:40:14 +04:00
parent 8dc6f43608
commit da4de1eb95

View File

@ -37,8 +37,8 @@ namespace BusinessLogic.BusinessLogic
{
throw new Exception("Insert operation failed.");
}
return PurchaseConverter.ToView(purchase);
throw new NotImplementedException();
//return PurchaseConverter.ToView(purchase);
}
public PurchaseViewModel Delete(PurchaseSearchModel model)
@ -51,9 +51,9 @@ namespace BusinessLogic.BusinessLogic
{
throw new Exception("Delete operation failed.");
}
return PurchaseConverter.ToView(purchase);
}
throw new NotImplementedException();
//return PurchaseConverter.ToView(purchase);
}
public PurchaseViewModel ReadElement(PurchaseSearchModel model)
{
@ -66,23 +66,23 @@ namespace BusinessLogic.BusinessLogic
throw new ElementNotFoundException();
}
_logger.LogInformation("ReadElement find. Id: {0}", purchase.Id);
return PurchaseConverter.ToView(purchase);
}
throw new NotImplementedException();
//return PurchaseConverter.ToView(purchase);
}
public IEnumerable<PurchaseViewModel> ReadElements(PurchaseSearchModel? model)
{
_logger.LogInformation("ReadList. Id: {Id}", model?.Id);
var purchase_list = _purchaseStorage.GetList(model);
var purchase_list = _purchaseStorage.GetFullList(model);
if (purchase_list is null || purchase_list.Count() == 0)
{
_logger.LogWarning("ReadList return null list");
return [];
}
_logger.LogInformation("ReadList. Count: {Count}", purchase_list.Count());
return purchase_list.Select(PurchaseConverter.ToView);
}
throw new NotImplementedException();
//return purchase_list.Select(PurchaseConverter.ToView);
}
public PurchaseViewModel Update(PurchaseBindingModel model)
{
@ -93,7 +93,8 @@ namespace BusinessLogic.BusinessLogic
{
throw new Exception("Update operation failed.");
}
return PurchaseConverter.ToView(purchase);
}
throw new NotImplementedException();
//return PurchaseConverter.ToView(purchase);
}
}
}