public void DeleteIteamFromInventory(long personId, long itemId) { Person person = crudPerson.Read(personId); Item item = crudIteam.Read(itemId); Inventory inv = crudInventory.Read(personId, itemId); inv = GetObject(inv.id); if (inv.count <= 1) { crudInventory.Delet(inv); } else { inv.count -= 1; crudInventory.Update(inv); } }
internal Item GetObject(long v) { return(cRUDItem.Read(v)); }