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.
Patch Config
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 the SVP of Engineering at CardFree working on building order ahead and contactless payment solutions.
Originally from Boston, but have been living in Denver for several years now. In my spare time I try to keep pace with my energentic golden, hike and ski, and occassionally post something interesting.