исправление тупой ошибки
This commit is contained in:
parent
1149a8fe88
commit
26a38322ef
@ -28,8 +28,18 @@ namespace SushiBarDatabaseImplement.Models
|
||||
{
|
||||
if (_shopSushi == null)
|
||||
{
|
||||
_shopSushi = ListSushiFk
|
||||
.ToDictionary(recPC => recPC.SushiId, recPC => (recPC.Sushi as ISushiModel, recPC.Count));
|
||||
_shopSushi = new();
|
||||
ListSushiFk.ForEach(x =>
|
||||
{
|
||||
if (_shopSushi.ContainsKey(x.SushiId))
|
||||
{
|
||||
_shopSushi[x.SushiId] = (x.Sushi as ISushiModel, _shopSushi[x.SushiId].Item2 + x.Count);
|
||||
}
|
||||
else
|
||||
{
|
||||
_shopSushi[x.SushiId] = (x.Sushi as ISushiModel, x.Count);
|
||||
}
|
||||
});
|
||||
}
|
||||
return _shopSushi;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user