Exemplo n.º 1
0
        public ActionResult <ProductListItem> Get(string id)
        {
            PD_S_PRODUCT Item = DBContext.PD_S_PRODUCT.FirstOrDefault(E => E.PRODUCT_CODE == id);

            if (Item == null)
            {
                throw new NotFoundException(string.Format("No product found with key: '{0}'", id));
            }

            ProductListItem Result = new ProductListItem(Item);

            Result.LoadExtData(DBContext, Item);
            return(Result);
        }