Exemple #1
0
 public Keep EditKeep(int id, [FromBody] Keep editKeep)
 {
     if (ModelState.IsValid)
     {
         var user = HttpContext.User.Identity.Name;
         return(_db.EditKeep(id, editKeep, user));
     }
     return(null);
 }
Exemple #2
0
        public ActionResult <Keep> Put(int id, [FromBody] Keep keep)
        {
            Keep result = _repo.EditKeep(id, keep);

            if (result != null)
            {
                return(result);
            }
            return(NotFound());
        }
 public Keep EditKeep([FromBody] Keep keep)
 {
     if (ModelState.IsValid)
     {
         Keep newKeep = _db.EditKeep(keep);
         if (newKeep != null)
         {
             return(newKeep);
         }
     }
     return(null);
 }
Exemple #4
0
        public Keep EditKeep(int id, [FromBody] Keep newKeep)

        {
            return(_db.EditKeep(id, newKeep));
        }
Exemple #5
0
 public Keep Put(int keepId, [FromBody] Keep keep)
 {
     keep.Id     = keepId;
     keep.UserId = HttpContext.User.Identity.Name;
     return(_keepRepo.EditKeep(keep));
 }