private void Initialize(CreateCapitalCityInputDto capitalCity, EntityDependency[] dependencies)
        {
            RegisterCommandRepositoryFactory <CapitalCity>(() => new CapitalCityCommandRepository());

            var countryDependency = (Country)dependencies?.SingleOrDefault()?.Entity;

            RootEntity = new CapitalCity
            {
                Name        = capitalCity.Name,
                CountryCode = (countryDependency != null) ? countryDependency.Id : capitalCity.CountryCode
            };

            Enqueue(new InsertEntityCommandOperation <CapitalCity>(RootEntity, dependencies));
        }
 public CreateCapitalCityCommandAggregate(CreateCapitalCityInputDto capitalCity, EntityDependency[] dependencies = null) : base(new DomainFramework.DataAccess.RepositoryContext(CountryWithCapitalCityConnectionClass.GetConnectionName()))
 {
     Initialize(capitalCity, dependencies);
 }