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

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