Skip to main content
added 1 character in body
Source Link
Pete Navarra
  • 14.7k
  • 3
  • 45
  • 89

The issue that you are seeing is because you are trying to instantiate a new ContactRepository().

The appropriate way to reference the repository is by creating the object through Sitecore's Configuration systemFactory.

private ContactRepository _repository = Sitecore.Configuration.Factory.CreateObject("tracking/contactRepository", true) as ContactRepository;

The issue that you are seeing is because you are trying to instantiate a new ContactRepository().

The appropriate way to reference the repository is by creating the object through Sitecore's Configuration system.

private ContactRepository _repository = Sitecore.Configuration.Factory.CreateObject("tracking/contactRepository", true) as ContactRepository;

The issue that you are seeing is because you are trying to instantiate a new ContactRepository().

The appropriate way to reference the repository is by creating the object through Sitecore's Configuration Factory.

private ContactRepository _repository = Sitecore.Configuration.Factory.CreateObject("tracking/contactRepository", true) as ContactRepository;
Source Link
Pete Navarra
  • 14.7k
  • 3
  • 45
  • 89

The issue that you are seeing is because you are trying to instantiate a new ContactRepository().

The appropriate way to reference the repository is by creating the object through Sitecore's Configuration system.

private ContactRepository _repository = Sitecore.Configuration.Factory.CreateObject("tracking/contactRepository", true) as ContactRepository;