ef relation

This commit is contained in:
2023-10-18 11:02:10 +09:00
parent 428733668d
commit 0c431ce57f
10 changed files with 365 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ namespace InventoryManagement
{
Console.WriteLine();
Console.WriteLine("Pease Enter the command.");
Console.WriteLine("(show: Show current Inventory, add: Add new product, buy: Buy product, sell: Sell product)");
Console.WriteLine("(show: Show current Inventory, add: Add new product, buy: Buy product, sell: Sell product, acc: Add accessary)");
Console.Write("CMD> ");
string cmd = Console.ReadLine().ToLower();
switch (cmd)
@@ -81,6 +81,18 @@ namespace InventoryManagement
InventoryManager.SellProduct(name, quantity);
break;
}
case "acc":
{
Console.Write("\tProduct id: ");
string productId = Console.ReadLine();
int pId = int.Parse(productId);
Console.Write("\tAccessary name: ");
string name = Console.ReadLine();
Console.Write("\tAccessary description: ");
string desc = Console.ReadLine();
InventoryManager.AddAccessary(pId, name, desc);
break;
}
}
}