public User Update(User request) { var response = request; using (SqlConnection conn = new SqlConnection(ConnectionString())) { using (var cmd = new SqlCommand()) { cmd.Connection = conn; cmd.CommandText = _userSql.SqlUpdate(); cmd.CommandType = CommandType.Text; cmd.Parameters.AddWithValue("@Id", GetDbValue(request.Id)); cmd.Parameters.AddWithValue("@Name", GetDbValue(request.Name)); cmd.Parameters.AddWithValue("@Email", GetDbValue(request.Email)); cmd.Parameters.AddWithValue("@Password", GetDbValue(request.Password)); conn.Open(); cmd.ExecuteNonQuery(); } } return(response); }