Exemple #1
0
        public async Task <ActionResult <int> > Update(int id, CreateUpdateInsuranceCommand command)
        {
            if (id != command.Id)
            {
                throw new InvalidOperationException();
            }

            return(await Mediator.Send(command));
        }
Exemple #2
0
 public async Task <ActionResult <int> > Create(CreateUpdateInsuranceCommand command)
 {
     return(await Mediator.Send(command));
 }