Небольшой фикс
This commit is contained in:
parent
08e7ecf217
commit
ff1c673e33
@ -77,7 +77,7 @@ namespace ShipyardDataBaseImplement.Models
|
||||
|
||||
public void UpdateShips(ShipyardDataBase context, ShopBindingModel model)
|
||||
{
|
||||
var shopShips = context.ShopShips.Where(rec => rec.ShipId == model.Id).ToList();
|
||||
var shopShips = context.ShopShips.Where(rec => rec.ShopId == model.Id).ToList();
|
||||
if (shopShips != null && shopShips.Count > 0)
|
||||
{
|
||||
context.ShopShips.RemoveRange(shopShips.Where(rec => !model.ShopShips.ContainsKey(rec.ShipId)));
|
||||
|
Loading…
Reference in New Issue
Block a user