Example #1
0
        public ResultCommand Handle(CreateCurrencyTypeCommand command)
        {
            var result = new ResultCommand();

            var currencyType = new CurrencyType(command.Name, command.Initials, command.Current, command.CultureInfo);

            result.AddNotifications(currencyType);

            if (result.Valid)
            {
                _repository.Insert(currencyType);
            }

            return(result);
        }