I'm building an ASP.NET MVC site where I want to limit how often authenticated users can use some functions of the site.

Although I understand how rate-limiting works fundamentally, I can't visualize how to implement it programatically without creating a major code smell.

Can you **point me towards a simple yet powerful solution for approaching such a problem, with C# sample code**?

If it matters, all of these functions are currently expressed as Actions that only accept `HTTP POST`. I may eventually want to implement rate-limiting for `HTTP GET` functions as well, so I'm looking for a solution that works for all such circumstances.