Example #1
0
        public async Task HandleAsync(QuoteRiskCreateCommand command)
        {
            await riskRepository.InsertAsync(command);

            //uncomment to see it getting handled by the decorator, rollbacked and logged
            //throw new Exception("An exception");
        }
Example #2
0
        public async Task HandleAsync(PolicyCreateCommand command)
        {
            var policy = new Policy()
            {
                Name = command.PolicyName
            };
            var success = await policyGenericRepository.InsertAsync(policy);

            command.PolicyId = policy.PolicyId;
        }