public bool UpdateUserFeedback(int userFeedbackId, UpdateUserFeedbackDTO userFeedbackToUpdate) { using (var db = new SqlConnection(_connectionString)) { var sql = @"Update [UserFeedback] SET [StarRating] = @StarRating ,[Review] = @Review WHERE [Id] = @Id"; userFeedbackToUpdate.Id = userFeedbackId; return(db.Execute(sql, userFeedbackToUpdate) == 1); } }
public IActionResult UpdateUserFeedbackById(int userFeedbackId, UpdateUserFeedbackDTO userFeedbackToUpdate) { _repo.UpdateUserFeedback(userFeedbackId, userFeedbackToUpdate); return(Ok()); }