コード例 #1
0
        private void Initialize(CreateUserRoleInputDto userRole, EntityDependency[] dependencies)
        {
            RegisterCommandRepositoryFactory <UserRole>(() => new UserRoleCommandRepository());

            RootEntity = new UserRole
            {
                Id = new UserRoleId
                {
                    RoleId = userRole.RoleId,
                    UserId = userRole.UserId
                }
            };

            Enqueue(new InsertEntityCommandOperation <UserRole>(RootEntity, dependencies));
        }
コード例 #2
0
 public CreateUserRoleCommandAggregate(CreateUserRoleInputDto userRole, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(AuthorizationConnectionClass.GetConnectionName()))
 {
     Initialize(userRole, dependencies);
 }