If you are building out a Sitecore MVC project or are just integrating Web API into your web forms project, you are going to want to expose the Sitecore Context to your controllers. An easy way to do this is to add a Route Pipeline in your httpRequestBegin section that will expose the Context. To do this, we will need to set up a patch config and a custom class that will actually expose the Sitecore Context.
Your.Framework.Pipelines.RoutePipeline - Custom Class
Once you link these up the Sitecore Context will be exposed. You can confirm that the pipeline is being added to the config by going to /sitecore/admin/showConfig.aspx.
I am a full stack developer currently working at CARDFREE building out RESTful services that supports our mobile apps and customer portal. For the most part I am working in .NET using Web API, but am becoming more immersed in RoR and grails.
I am originally from Boston, but have been living in Colorado for some time now. In my spare time I try to keep pace with my energentic golden, hike and ski, and occassionally post something interesting.