Example #1
0
 public static void Initialize()
 {
     IocContainerManage.Build();
     //
     UnitOfWorkContextManage.Register(() => new EFUnitOfWorkContext());
     DbContextManage.Register(() => new NKingimeDb());
     //
     userRepository = IocContainerManage.Container.Resolve <IUserRepository>();
 }
Example #2
0
 public static void Initialize()
 {
     IocContainerManage.Build();
     //
     UnitOfWorkContextManage.Register(() => new EFUnitOfWorkContext());
     DbContextManage.Register(() => new NKingimeDb());
     //
     transactionManage = IocContainerManage.Container.Resolve <ITransactionManage>();
 }
Example #3
0
 /// <summary>
 /// 注册
 /// </summary>
 public static void Register()
 {
     IocContainerManage.Build();
     DependencyResolver.SetResolver(new AutofacDependencyResolver(IocContainerManage.Container));
 }