diff --git a/ConfectionaryListImplement/ClientStorage.cs b/ConfectionaryListImplement/ClientStorage.cs index 7a43dca..7a609c9 100644 --- a/ConfectionaryListImplement/ClientStorage.cs +++ b/ConfectionaryListImplement/ClientStorage.cs @@ -67,11 +67,11 @@ namespace ConfectioneryListImplement public ClientViewModel? Insert(ClientBindingModel model) { 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);