Ejemplo n.º 1
0
        public ActionResult Post([FromBody] Product product)
        {
            _uof.ProductRepository.Add(product);
            _uof.Commit();

            return(new CreatedAtRouteResult("GetProduct",
                                            new { id = product.ProductId }, product));
        }
        public ActionResult Post([FromBody] Category category)
        {
            _uof.CategoryRepository.Add(category);
            _uof.Commit();

            return(new CreatedAtRouteResult("GetCategory",
                                            new { id = category.CategoryId }, category));
        }