public IHttpActionResult Add(Product _objProduct) { if (_objProduct == null) { return(BadRequest()); } _objProduct = _objContext.SaveProduct(_objProduct); return(CreatedAtRoute("GetProductByID", new { id = _objProduct.ID }, _objProduct)); }
public IHttpActionResult Add(Product _objProduct) { if (_objProduct == null) { return(BadRequest()); } _objProduct = _objContext.SaveProduct(_objProduct); return(CreatedAtRoute("GetProductByID", new { id = _objProduct.ID }, _objProduct)); }