Skip to content

Instantly share code, notes, and snippets.

@gerhart92
Created July 29, 2021 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gerhart92/5267332cc4299de71fe41c5dfa560c7d to your computer and use it in GitHub Desktop.
Save gerhart92/5267332cc4299de71fe41c5dfa560c7d to your computer and use it in GitHub Desktop.
using Glass.Mapper.Sc.Web.Mvc;
using Sitecore.Mvc.Controllers;
namespace Test.Foundation.SitecoreExtensions.Controllers
{
public class MvcController : SitecoreController
{
public IMvcContext MvcContext { get; set; }
public MvcController()
: this(new MvcContext(new SitecoreService(Sitecore.Context.Database))) { }
public MvcController(IMvcContext mvcContext)
{
MvcContext = mvcContext;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment