Merge branch 'Lab5_Base' into Lab6_Base
This commit is contained in:
commit
bb9275361c
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user