Пример #1
0
        private void Initialize(CourseRelationInputDto courseRelation, EntityDependency[] dependencies)
        {
            RegisterCommandRepositoryFactory <CourseRelation>(() => new CourseRelationCommandRepository());

            RootEntity = new CourseRelation
            {
                Id = new CourseRelationId
                {
                    Relates_CourseId     = courseRelation.Relates_CourseId,
                    IsRelatedTo_CourseId = courseRelation.IsRelatedTo_CourseId
                }
            };

            Enqueue(new InsertEntityCommandOperation <CourseRelation>(RootEntity, dependencies));
        }
Пример #2
0
 public CreateCourseRelationCommandAggregate(CourseRelationInputDto courseRelation, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(CourseWithPreRequisitesAndRelatedConnectionClass.GetConnectionName()))
 {
     Initialize(courseRelation, dependencies);
 }