Beispiel #1
0
 protected override void Load(ContainerBuilder builder)
 {
     builder.Register(ctx =>
     {
         IUserPersistence persistence = ctx.Resolve <IUserPersistence>();
         IMapper mapper = ctx.Resolve <IMapper>();
         return(new UserDomain(persistence, mapper));
     }).As <IUserDomain>().InstancePerLifetimeScope();
 }
Beispiel #2
0
 public UserDomain(IUserPersistence persistence, IMapper mapper)
 {
     _persistence = persistence;
     _mapper      = mapper;
 }
Beispiel #3
0
 public UserController(IUserPersistence userPersistence)
 {
     _userPersistence = userPersistence;
 }