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)); }
public CreateUserRoleCommandAggregate(CreateUserRoleInputDto userRole, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(AuthorizationConnectionClass.GetConnectionName())) { Initialize(userRole, dependencies); }