コード例 #1
0
        public static CountryTax Create(Guid id, TaxType type, Country country, decimal percentage)
        {
            CountryTax countryTax = Create(type, country, percentage);

            countryTax.Id = id;
            return(countryTax);
        }
コード例 #2
0
        public static CountryTax Create(Guid id, TaxType type, Country country, decimal percentage)
        {
            CountryTax countryTax = new CountryTax()
            {
                Id         = id,
                Country    = country,
                Percentage = percentage,
                Type       = type
            };

            DomainEvents.Raise <CountryTaxCreated>(new CountryTaxCreated()
            {
                CountryTax = countryTax
            });

            return(countryTax);
        }