private async void buttonDelete_Click(object sender, EventArgs e) { var deleteProfessorRequest = new DeleteProfessorRequest { ProfessorId = textBoxProfessorId.Text }; var professorDeleted = await _client.DeleteProfessorByIdAsync(deleteProfessorRequest); MessageBox.Show($"Professor Deleted: {professorDeleted}"); }
public override async Task <DeleteProfessorResponse> DeleteProfessorById(DeleteProfessorRequest request, ServerCallContext context) { _logger.Log(LogLevel.Debug, "Request Received for CollegeGrpcService::DeleteProfessorById"); var professorDeleted = new DeleteProfessorResponse { ProfessorId = request.ProfessorId.ToString(), Message = "Professor Deleted" }; professorDeleted.Success = await _professorsBll.DeleteProfessorById(Guid.Parse(request.ProfessorId)); _logger.Log(LogLevel.Debug, "Returning the results from CollegeGrpcService::DeleteProfessorById"); return(professorDeleted); }