Model fixes.
This commit is contained in:
parent
f64c7b284c
commit
f7c05cc17d
@ -93,7 +93,7 @@ namespace ComputerStoreDatabaseImplement.Models
|
|||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(var updateComponent in pcComponents)
|
foreach(var updateComponent in pcComponents.Where(x => model.PCComponents.ContainsKey(x.ComponentID) && x.RequestID == model.RequestID))
|
||||||
{
|
{
|
||||||
updateComponent.Count = model.PCComponents[updateComponent.ComponentID].Item2;
|
updateComponent.Count = model.PCComponents[updateComponent.ComponentID].Item2;
|
||||||
model.PCComponents.Remove(updateComponent.ComponentID);
|
model.PCComponents.Remove(updateComponent.ComponentID);
|
||||||
|
Loading…
Reference in New Issue
Block a user