private void Initialize(ClassEnrollmentInputDto enrollment, EntityDependency[] dependencies) { RegisterCommandRepositoryFactory <ClassEnrollment>(() => new ClassEnrollmentCommandRepository()); RootEntity = new ClassEnrollment { Id = new ClassEnrollmentId { ClassId = enrollment.ClassId, StudentId = enrollment.StudentId }, StartedDateTime = enrollment.StartedDateTime }; Enqueue(new DeleteEntityCommandOperation <ClassEnrollment>(RootEntity, dependencies)); }
public DeleteClassEnrollmentCommandAggregate(ClassEnrollmentInputDto enrollment, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(ClassesWithStudentsConnectionClass.GetConnectionName())) { Initialize(enrollment, dependencies); }