Questions tagged [dependency-injection]

Anything related to the use of Dependency Injection (DI)/IoC containers on a Sitecore solution. This also includes the baked-in Microsoft Dependency Resolver included natively in Sitecore versions 8.2 and above.

Filter by
Sorted by
Tagged with
12 votes
2 answers

Injecting dependencies into a custom WFFM save action

We have a client that is on 8.1u1 and is using WFFM. They want to integrate the data collected on the form into Dynamics CRM, however the OOTB save actions for creating entities in the CRM aren't ...
LonghornTaco's user avatar
  • 2,536
39 votes
5 answers

Best approach for Dependency Injection in Sitecore 8.2

I see a fair few approaches in blog posts for using DI with 8.2, particularly around the registration. Is there an approach which would be recommended - particularly with a Helix compatible ...
Eldblom's user avatar
  • 910
16 votes
1 answer

SimpleInjector as default DI in Sitecore 8.2

I read this post today about replacing Sitecores 8.2 default DI (, but the example is for Autofac. We ...
Adam Seabridge's user avatar
8 votes
6 answers

SXA custom component looking for parameterless constructor

I am trying to create my first SXA compatible component, and I can't seem to get everything setup quite right. I decompiled the Maps component, and am using it as my guide. I understand that I need to ...
Keith VanderVeen's user avatar
3 votes
2 answers

Sitecore Dependency Injection - Registering services with the lifetime of a web request

How can I register a service with "PerWebRequest" lifetime using the native Sitecore DI? I can imagine I need to play around the Scoped lifetime and set the default scope to Web Request somehow? Did ...
Volodymyr Hil's user avatar
1 vote
0 answers

Sitecore 9 Forms - SimpleInjector conflicting with FormBuilderController

Sitecore 9.0.1 (rev. 171219) SimpleInjector v.4.3.0 Glass.Mapper v. Steps To Reproduce: In the Sitecore dashboard I click on the Forms button Click the Create button and select Blank Form On ...
melvin's user avatar
  • 11
0 votes
0 answers

Autofac.Core.DependencyResolutionException Sitecore 9.2

I am getting below error in the logs, when I am overriding Sitecore Dependency Injection with Autofac DI. I am using Sitecore 9.2. The main issue is with Create Actions on EXM & Forms. Can ...
Sharad Kumar Sangal's user avatar