I understand that the Glass Mapper v4 can now be used in conjunction with any IoC container. But I'm struggling to find a code example of how to achieve this.
I want to be able register glass components and inject them into my controllers using Unity, for example:
public class SearchController : Controller
{
private readonly ISitecoreContext _context;
//Inject via Unity
public SearchController(Glass.Mapper.Sc.ISitecoreContext context)
{
_context = context;
}
}
Can someone provide a code example for how to get Glass linked up with Unity?