Skip to content

Instantly share code, notes, and snippets.

@justinyoo justinyoo/ioc-container.cs Secret
Created Dec 1, 2015

Embed
What would you like to do?
CRM 2015 Filtering Sample
private static void RegisterCrmProxies(ContainerBuilder builder)
{
builder.Register(c => new CrmConnection("OrganisationServiceContext"))
.PropertiesAutowired().InstancePerLifetimeScope();
builder.Register(c => new OrganizationService(c.Resolve<CrmConnection>()))
.As<IOrganizationService>().PropertiesAutowired().InstancePerLifetimeScope();
builder.Register(c => new OrganisationServiceContext(c.Resolve<IOrganizationService>()))
.As<IOrganisationServiceContext>().PropertiesAutowired().InstancePerLifetimeScope();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.