Begin by preparing the aubergine. Cut it into small cubes and place in a colander. Sprinkle with salt and let it sit for 30 minutes. This will help to remove any excess moisture and bitterness from the aubergine.
After 30 minutes, rinse the aubergine under cold water and pat dry with a paper towel.
Heat the olive oil in a large saucepan over medium heat. Add the chopped onion and minced garlic, and cook for 2-3 minutes until the onion is soft and translucent.
Add the cubed aubergine to the saucepan and cook for 5-7 minutes until it is soft and lightly browned.
Add the can of chopped tomatoes, dried oregano, and dried basil to the saucepan. Season with salt and pepper to taste. Reduce the heat to low and let the sauce simmer for 10-15 minutes until it has thickened.
While the sauce is simmering, cook the wholegrain pasta in a large pot of boiling salted water, following the instructions on the package. Drain the pasta and set it aside.
Once the tomato sauce has thickened, add the cooked pasta to the saucepan and toss it gently with the sauce until it is well coated.
Serve the pasta with a sprinkle of grated Parmesan cheese and a few fresh basil leaves on top.