private async Task OnVote(int selectedRate) { model.UserVote = selectedRate; MovieRating movieRating = new MovieRating() { Rate = selectedRate, MovieId = MovieId }; await RatingRepository.Vote(movieRating); await DisplayMessage.DisplaySuccess("Your vote has been received!"); }
private async Task RemoveRole() { if (selectedRole == "0") { await DisplayMessage.DisplayError("You must select a role"); return; } await UsersRepository.RemoveRole(new EditRoleDTO() { RoleName = selectedRole, UserId = UserId }); await DisplayMessage.DisplaySuccess("Role removed"); }