Heat oil in a nonstick pan (low flame) add garlic, onion and sauté for 30 seconds or until onion gets caramelized. Add carrots, sweet corn, green peas and salt. Sauté vegetables for a minute.
Add pasta stock to above veggies and stir. Take the pan away from flame, add mayonnaise and stir well. Bring it back to flame and let it simmer for 1-2 minutes or until sauce thickens.
Add pasta to above sauce and toss well with the sauce. Serve hot.