Beispiel #1
0
 public virtual void ConfigureContainer(ContainerBuilder builder)
 {
     DependencyHelper.RegisterCommonTypes(builder, typeof(CoreCommon.Data.EntityFrameworkBase.Components.EmptyDbContext));
     builder.RegisterType <DbContextManager>()
     .AsSelf()
     .PropertiesAutowired()
     .InstancePerLifetimeScope();
 }
Beispiel #2
0
        /// <summary>
        /// Register types
        /// </summary>
        /// <param name="builder"></param>
        public static void ConfigureContainer(ContainerBuilder builder)
        {
            DependencyHelper.RegisterCommonTypes(builder, ModuleHelper.FindAllAssemblies().ToArray());

            foreach (var moduleConfig in ModuleHelper.GetModules())
            {
                moduleConfig.ConfigureContainer(builder);
            }
        }
Beispiel #3
0
 /// <summary>
 /// Registering types with using Autofac
 /// </summary>
 /// <param name="builder"></param>
 public override void ConfigureContainer(ContainerBuilder builder)
 {
     base.ConfigureContainer(builder);
     DependencyManager.ConfigureContainer(builder);
     DependencyHelper.RegisterCommonTypes(builder, typeof(Program));
 }
Beispiel #4
0
 public override void ConfigureContainer(ContainerBuilder builder)
 {
     DependencyHelper.RegisterCommonTypes(builder, GetType());
     base.ConfigureContainer(builder);
 }