I'm making fresh pasta and I'd like to put garlic in it. The problem is that garlic needs to be sauteed to taste good right? Since it doesn't take long to cook fresh pasta, will it work to just saute the pasta instead of boiling it?
You can avoid the problem simply by leaving the pasta very hard (al dente), given that the fresh pasta cooks in about 4 minutes you should drain it at 3 minutes, and finish cooking sautèeing (you should save some of the cooking water to add if it gets too much dry). This technique (mantecatura) is used in a lot of pasta recipes to obtain a deeper flavour or to obtain creamy sauces.
Fresh as in not dried? Yes, that will work. Just watch your heat, ensure it doesn't stick to the pan.
Personally I would lightly sautee the garlic in a lot of olive oil (making the olive oil the eventual sauce), then toss in the pasta for just long enough to heat it through, and then nomnomnom.
I don't know if that will work, but it certainly isn't the traditional method. The normal way you would do this is to saute the garlic in butter (oil if you want, but generally fresh pasta pairs better with butter), then toss that with the quickly boiled pasta.
It will "work" in that your pasta will be cooked, but it won't be the same as boiling it.
I would suggest boiling your pasta as normal, and tossing it in the oil afterwards.
You need to boil pasta, not because this cooks it but because it rehydrates it, so sauteeing it would be as effective as baking it in the oven. I do pasta like this with garlic like so: Boil the pasta until it's done then drain it. Leave the hot pasta in the collander while you sautee crushed garlic in olive oil (I add a crushed dried chilli). The best method for the garlic is to heat the oil, remove from the heat then add the garlic, so you don't overcook it. Your pasta will have dried out a but by this time so will be ready to soak up the garlic flavoured oil.