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

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