public void Register(Organization organization) { try { IStorageCommand command = new RegisterOrganizationCommand(organization); command.Execute(this); } catch (Exception ex) { throw new ServiceException(ex.Message); } }
public void Register([FromBody] RegisterOrganizationCommand command) { command.RegisteredBy = Guid.NewGuid().ToString(); Mediator.Send(command); }