コード例 #1
0
        public void Solicitar(RegistroSolicitacaoCreditoCommand command)
        {
            var solicitacao = SolicitacaoCredito.Factory.New(command);

            if (solicitacao.Policy.IsValid)
                _repository.Salvar(solicitacao);
            else
                Notify(solicitacao.Policy.GetNotifications());
        }
コード例 #2
0
 public static SolicitacaoCredito New(RegistroSolicitacaoCreditoCommand command)
 {
     return new SolicitacaoCredito(command.ClienteId, command.Valor);
 }