Beispiel #1
0
        public ActionResult <DataResult <bool> > UpdateUser([FromBody] User user)
        {
            var existUser = _userDataRepo.GetBy(x => x.Id == user.Id).FirstOrDefault();

            if (existUser != null)
            {
                var id = existUser.Id;
                existUser    = user;
                existUser.Id = id;
                return(_userDataRepo.Update(existUser, s => s.Id == existUser.Id));
            }

            return(new DataResult <bool>(false));
        }
Beispiel #2
0
 public ActionResult <DataResult <User> > UpdateUser([FromBody] User user)
 {
     return(_userDataRepo.Update(user));
 }