public void FindItemPriceBySupplierCodeTest()
        {
            //Arrange
            string test = "ALPA";

            //Act
            var result = itemPriceService.FindItemPriceBySupplierCode(test);

            //Assert
            CollectionAssert.AllItemsAreInstancesOfType(result, typeof(ItemPrice));
            foreach (ItemPrice element in result)
            {
                Assert.AreEqual("ALPA", element.SupplierCode);
            }
        }
        public IHttpActionResult GetPriceList(string Id)
        {
            List <ItemPrice> pricelist = itempriceService.FindItemPriceBySupplierCode(Id);

            if (pricelist.Count == 0)
            {
                return(NotFound());
            }

            return(Ok(pricelist.Select(item => new ItemPriceViewModel {
                ItemCode = item.ItemCode,
                SupplierCode = item.SupplierCode,
                ItemCategoryName = item.Item.ItemCategory.Name,
                Description = item.Item.Description,
                Uom = item.Item.Uom,
                Price = item.Price
            }).ToList()));
        }