public static int Delete(InventoryItem inventoryItem)
        {
            using (ObjectConnection objectConnection = new ObjectConnection())
            {
                using (DeleteInventoryItemByInventoryItemIdCommand objectCommand = new DeleteInventoryItemByInventoryItemIdCommand(objectConnection))
                {
                    objectCommand.InventoryItemId = inventoryItem.InventoryItemId;

                    objectConnection.Open();
                    objectCommand.ExecuteNonQuery();

                    return objectCommand.ReturnValue;
                }
            }
        }
예제 #2
0
        public static int Delete(InventoryItem inventoryItem)
        {
            using (ObjectConnection objectConnection = new ObjectConnection())
            {
                using (DeleteInventoryItemByInventoryItemIdCommand objectCommand = new DeleteInventoryItemByInventoryItemIdCommand(objectConnection))
                {
                    objectCommand.InventoryItemId = inventoryItem.InventoryItemId;

                    objectConnection.Open();
                    objectCommand.ExecuteNonQuery();

                    return(objectCommand.ReturnValue);
                }
            }
        }