read this code:
using System.ComponentModel;

namespace test2
{
    public class Program
    {
        //Lists and objects for storing inputs
        static List<Category> categories = new List<Category>();
        static List<Product> products = new List<Product>();
        static List<Warehouse> warehouses = new List<Warehouse>();
        static List<WarehousLogic> showList = new List<WarehousLogic>();

        public static void Main(string[] args)
        {
            while (true)
            {
                // Show & Print List of Warehouse App in Console
                //Console.Clear();
                string? textShow = "Warehouse Management System";

                Console.WriteLine(new string('*', textShow.Length + 4));
                Console.WriteLine($"* {textShow} *");
                Console.WriteLine(new string('*', textShow.Length + 4));
                // Console.WriteLine("ـــــ Please Choose Your Category: ـــــ\r\n");
                Console.WriteLine("1. Define Category");
                Console.WriteLine("2. Define Product");
                Console.WriteLine("3. Define Warehouse");
                Console.WriteLine("4. Display Warehouse");
                Console.WriteLine("5. Record Warehouse Entry");
                Console.WriteLine("6. Record Warehouse Exit");
                Console.WriteLine("7. Display Inventory");
                Console.WriteLine("8. Exit\n");

                Console.Write("Choose an option: ");
                int choice = int.Parse(Console.ReadLine());

                switch (choice)
                {
                    case 1:
                        DefineCategory();
                        break;
                    case 2:
                        DefineProduct();
                        break;
                    case 3:
                        DefineWarehouse();
                        break;
                    case 4:
                        DisplayWarehouses();
                        break;
                    case 5:
                        RecordEntry();
                        break;
                    case 6:
                        RecordExit();
                        break;
                    case 7:
                        ShowInventory();
                        break;
                    case 8:
                        Console.Clear();
                        Console.WriteLine("Exiting application, GoodBye!");
                        return;
                    default:
                        Console.WriteLine("Invalid option. Please try again.");
                        break;
                }
            }
        }

        public static void DefineCategory()
        {
            Console.Write("Enter category name: ");
            string? categoryName = Console.ReadLine();
            Console.Write("Enter category code: ");
            string? categoryCode = Console.ReadLine();
            categories.Add(new Category(categoryName, categoryCode));
            Console.WriteLine("Category added successfully.");
        }

        public static void DefineProduct()
        {
            Console.Write("Enter product name: ");
            string? productName = Console.ReadLine();
            Console.Write("Enter product code: ");
            string? productCode = Console.ReadLine();
            Console.Write("Enter category name: ");
            string? categoryName = Console.ReadLine();
            Console.Write("Enter category code: ");
            string? categoryCode = Console.ReadLine();
            Console.Write("Enter price: ");
            decimal productPrice = decimal.Parse(Console.ReadLine());
            Console.Write("Enter unit: ");
            string? productUnit = Console.ReadLine();
            products.Add(new Product(productName, productCode, categoryName, categoryCode, productPrice, productUnit));
            Console.WriteLine("Product added successfully.");
        }

        public static void DefineWarehouse()
        {
            Console.Write("Enter warehouse name: ");
            string? warehouseName = Console.ReadLine();
            Console.Write("Enter warehouse code: ");
            string? warehouseCode = Console.ReadLine();
            warehouses.Add(new Warehouse(warehouseName, warehouseCode));
            Console.WriteLine("Warehouse added successfully.");
        }

        public static void DisplayWarehouses()
        {
            Console.WriteLine("Warehouse List:\n");
            foreach (var warehouse in warehouses)
            {
                Console.WriteLine($"Name: {warehouse.Name}, Code: {warehouse.Code}");
                foreach (var warehouseProduct in products)
                {
                    var items = warehouseProduct;
                    Console.WriteLine($"Product Name: {warehouseProduct.Name}\n" + $"Product Code: {warehouseProduct.Code}\n" + $"Category Name: {warehouseProduct.CategoryName}\n" + $"Category Code: {warehouseProduct.CategoryCode}\n" + $"Product Price: {warehouseProduct.Price}\n");
                }
            }
        }

        public static void RecordEntry()
        {
            Console.Write("Enter product code: ");
            string productCode = Console.ReadLine();
            Console.Write("Enter warehouse code: ");
            string warehouseCode = Console.ReadLine();
            Console.Write("Enter entry date (yyyy-MM-dd): ");
            DateTime date = DateTime.Parse(Console.ReadLine());
            Console.Write("Enter operator name: ");
            string operatorName = Console.ReadLine();

            showList.Add(new WarehousLogic(productCode, warehouseCode, date, operatorName, "Entry"));
            Console.WriteLine("Entry recorded successfully.");
        }

        public static void RecordExit()
        {
            Console.Write("Enter product code: ");
            string? productCode = Console.ReadLine();
            Console.Write("Enter warehouse code: ");
            string? warehouseCode = Console.ReadLine();
            Console.Write("Enter exit date (yyyy-MM-dd): ");
            DateTime date = DateTime.Parse(Console.ReadLine());
            Console.Write("Enter operator name: ");
            string? operatorName = Console.ReadLine();

            showList.Add(new WarehousLogic(productCode, warehouseCode, date, operatorName, "Exit"));
            Console.WriteLine("Exit recorded successfully.");
        }

        public static void ShowInventory()
        {
            Console.WriteLine("************************");
            Console.WriteLine("Inventory");
            Console.WriteLine("************************\n");

            foreach (var warehouse in warehouses)
            {
                Console.WriteLine($"Warehouse: {warehouse.Name} ({warehouse.Code})");
                var showInvenstory = showList.FindAll(t => t.WarehouseCode == warehouse.Code);
                foreach (var productShow in products)
                {
                    int entryCount = showInvenstory.FindAll(t => t.ProductCode == productShow.Code && t.Type == "Entry").Count;
                    int exitCount = showInvenstory.FindAll(t => t.ProductCode == productShow.Code && t.Type == "Exit").Count;
                    int currentInventory = entryCount - exitCount;
                    Console.WriteLine($"Product: {productShow.Name}, Code: {productShow.Code}, Current Inventory: {currentInventory}");
                }
            }
        }
    }
}