Esempio n. 1
0
 public Keep Put(int id, [FromBody] Keep keep)
 {
     if (ModelState.IsValid)
     {
         return(db.GetOneByIdAndUpdate(id, keep));
     }
     return(null);
 }
Esempio n. 2
0
        public ActionResult <Keep> Put(int id, [FromBody] Keep keep)
        {
            Keep result = _repo.GetOneByIdAndUpdate(id, keep);

            if (result != null)
            {
                return(result);
            }
            return(NotFound());
        }