Merge branch 'Lab5_Base' into Lab6_Base

This commit is contained in:
Данияр Аглиуллов 2023-03-13 23:13:04 +04:00
commit bb9275361c

View File

@ -67,11 +67,11 @@ namespace ConfectioneryListImplement
public ClientViewModel? Insert(ClientBindingModel model) public ClientViewModel? Insert(ClientBindingModel model)
{ {
model.Id = 1; model.Id = 1;
foreach (var component in _source.Components) foreach (var client in _source.Clients)
{ {
if (model.Id <= component.Id) if (model.Id <= client.Id)
{ {
model.Id = component.Id + 1; model.Id = client.Id + 1;
} }
} }
var res = Client.Create(model); var res = Client.Create(model);