Exemplo n.º 1
0
        public void Handle(UpdateTermsAndConditions command)
        {
            var company = _repository.Get(command.CompanyId);

            company.UpdateTermsAndConditions(command.TermsAndConditions);

            _repository.Save(company, command.Id.ToString());
        }
Exemplo n.º 2
0
        public object Post(TermsAndConditionsRequest request)
        {
            var command = new UpdateTermsAndConditions
            {
                CompanyId          = AppConstants.CompanyId,
                TermsAndConditions = request.TermsAndConditions
            };

            _commandBus.Send(command);

            return(new HttpResult(HttpStatusCode.OK));
        }