public int Update(InternetUserUpdateDto prod, int internetUserId) { using (IDbConnection dbConnection = Connection) { return(dbConnection.Execute(InternetUserQueries.Update, new { prod.Description, prod.ContractId, prod.FirstName, prod.LastName, prod.IpAddress, prod.Location, prod.StatusId, Id = internetUserId })); } }
public bool Update(InternetUserUpdateDto internetUser, int internetUserId) { if (_internetUserRepository.Update(internetUser, internetUserId) != 0) { return(true); } return(false); }
public IActionResult Put(int id, [FromBody] InternetUserUpdateDto value) { if (ModelState.IsValid) { if (_internetUserService.Update(value, id)) { return(Ok()); } } return(BadRequest()); }