/// <summary> /// Adds plant to inventory /// </summary> public void AddPlantToInventory() { Console.WriteLine("Select a location from the following by id to add a plant to inventory:"); foreach (var location in locationService.GetAllLocations()) { Console.WriteLine($"\tlocation id: {location.LocationId} location name: {location.Name}"); } int idLocation = Int32.Parse(Console.ReadLine()); Location _location = locationService.GetLocationById(idLocation); Console.WriteLine("Select product by id from list to add to store inventory: "); foreach (var product in productService.GetAllProducts()) { Console.WriteLine($"\tProduct id: {product.ProductId} product name: {product.Name}"); } int idProduct = Int32.Parse(Console.ReadLine()); Product _product = productService.GetProduct(idProduct); Console.WriteLine("Enter Quantity to be added: "); int quantity = Int32.Parse(Console.ReadLine()); inventoryService.AddItemToInventory(_location, _product, quantity); }