Beispiel #1
0
        public string Put(string id, [FromBody] Producto p)
        {
            var result = "false";

            if (objds.Update(new ObjectId(id), p) == "1")
            {
                result = "true";
            }
            return(result);
        }
        public IActionResult Put(string id, [FromBody] Producto p)
        {
            var recId    = new ObjectId(id);
            var Producto = objds.GetProducto(recId);

            if (Producto == null)
            {
                return(NotFound());
            }

            objds.Update(recId, p);
            return(new OkResult());
        }