My suggestion is you should read more detective stories! There are plenty that are done from the viewpoint of the protagonist.
Probably the purest form of this is the private eye monologue, which is the signature style of noir (especially film noir), and almost always means the novel or film is from the viewpoint of the protagonist in the first person. Other answers have already pointed to a few examples from Raymond Chandler, who was a master of this style, and Dashiell Hammett.
There are many as well that don't have the monologue, but are done only showing the viewpoint of the protagonist. Polanski's Chinatown is a classic example: since there is no monologue, you only see what he sees, go where he goes, and know what he knows when he tells someone. This was a clever way of dealing avoiding issues with the monologue, but still keeping with the protagonist's viewpoint.
Contrary to what others have said, I personally think the viewpoint works very well and is an excellent way of building suspense: since the reader only knows what the character knows, it allows you to keep readers in the dark, follow red herrings, reveal things only once the detective becomes aware, and so on.
Especially with the monologue style, one of the reasons you don't see it much anymore is because it's an exceptionally difficult thing to pull off. It's also been done so much from the noir era, that you might find a lot of people avoid it because it's such a recognised trope. It's one of the reasons that The Naked Gun parodied it. (As a side note: the first Blade Runner film had a monologue over it, that was later removed in later versions.)