To get Autofac integrated with RIA/domain services app you need to reference the Domain Services integration NuGet package, register services, and register the integration module.

publicclassGlobal:HttpApplication,IContainerProviderAccessor{// The IContainerProviderAccessor and IContainerProvider// interfaces are part of the web integration and are used// for registering/resolving dependencies on a per-request// basis.privatestaticIContainerProvider_containerProvider;publicIContainerProviderContainerProvider{get{return_containerProvider;}}protectedvoidApplication_Start(objectsender,EventArgse){varbuilder=newContainerBuilder();// Register your domain services.builder.RegisterAssemblyTypes(Assembly.GetExecutingAssembly()).AssignableTo<DomainService>();// Add the RIA Services module so the "Initialize"// method gets called on your resolved services.builder.RegisterModule<AutofacDomainServiceModule>();// Build the container and set the container provider// as in standard web integration.varcontainer=builder.Build();_containerProvider=newContainerProvider(container);// Replace the DomainService.Factory with// AutofacDomainServiceFactory so things get resolved.varfactory=newAutofacDomainServiceFactory(_containerProvider);DomainService.Factory=factory;}}

When you write your domain services, use constructor injection and other standard patterns just like any other Autofac/IoC usage.