public ActionResult AddNewItem(string itemName, int itemPrice, int quantity) { if (_repository.IfAlreadyExists(itemName)) { return View("AlreadyExists"); } else { var newItem = _pos.AddNewItem(itemName, itemPrice); var newItemId = _repository.AddNewItem(newItem); var addNewItemStock = _pos.NewItemStock(newItemId, quantity); _repository.AddNewItemStock(addNewItemStock); var items = _repository.Items(); return View(items); } }