всё работает
This commit is contained in:
parent
fe67f3f997
commit
b0b92c6be3
@ -32,7 +32,8 @@ namespace ComputersShopBusinessLogic.BusinessLogics
|
|||||||
|
|
||||||
if (quantity <= 0)
|
if (quantity <= 0)
|
||||||
{
|
{
|
||||||
throw new ArgumentException("Количество добавляемого изделия должно быть больше 0", nameof(quantity));
|
return false;
|
||||||
|
throw new ArgumentException("Количество добавляемого изделия должно быть больше 0", nameof(quantity));
|
||||||
}
|
}
|
||||||
|
|
||||||
_logger.LogInformation("AddComputerInShop. ShopName:{ShopName}.Id:{ Id}", model.ShopName, model.Id);
|
_logger.LogInformation("AddComputerInShop. ShopName:{ShopName}.Id:{ Id}", model.ShopName, model.Id);
|
||||||
|
@ -99,8 +99,8 @@ namespace ComputersShopFileImplement.Models
|
|||||||
new XElement("ShopAddress", ShopAddress),
|
new XElement("ShopAddress", ShopAddress),
|
||||||
new XElement("DateOpening", DateOpening.ToString()),
|
new XElement("DateOpening", DateOpening.ToString()),
|
||||||
new XElement("Capacity", Capacity.ToString()),
|
new XElement("Capacity", Capacity.ToString()),
|
||||||
new XElement("Сomputers", ComputersCount.Select(x =>
|
new XElement("Computers", ComputersCount.Select(x =>
|
||||||
new XElement("Сomputer",
|
new XElement("Computer",
|
||||||
new XElement("Key", x.Key),
|
new XElement("Key", x.Key),
|
||||||
new XElement("Value", x.Value)))
|
new XElement("Value", x.Value)))
|
||||||
.ToArray()));
|
.ToArray()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user