private void Initialize(CountryAddCapitalCityInputDto country, EntityDependency[] dependencies)
        {
            RegisterCommandRepositoryFactory <Country>(() => new CountryCommandRepository());

            RootEntity = new Country
            {
                Id = country.CountryCode
            };

            if (country.CapitalCity != null)
            {
                ILinkedAggregateCommandOperation operation;

                var capitalCity = country.CapitalCity;

                if (capitalCity is CreateCapitalCityInputDto)
                {
                    operation = new AddLinkedAggregateCommandOperation <Country, CreateCapitalCityCommandAggregate, CreateCapitalCityInputDto>(
                        RootEntity,
                        (CreateCapitalCityInputDto)capitalCity,
                        new EntityDependency[]
                    {
                        new EntityDependency
                        {
                            Entity   = RootEntity,
                            Selector = "CapitalCity"
                        }
                    }
                        );

                    Enqueue(operation);
                }
                else
                {
                    throw new NotImplementedException();
                }
            }
        }
 public CountryAddCapitalCityCommandAggregate(CountryAddCapitalCityInputDto country, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(CountryWithCapitalCityConnectionClass.GetConnectionName()))
 {
     Initialize(country, dependencies);
 }