public void Handle(UpdateTermsAndConditions command) { var company = _repository.Get(command.CompanyId); company.UpdateTermsAndConditions(command.TermsAndConditions); _repository.Save(company, command.Id.ToString()); }
public object Post(TermsAndConditionsRequest request) { var command = new UpdateTermsAndConditions { CompanyId = AppConstants.CompanyId, TermsAndConditions = request.TermsAndConditions }; _commandBus.Send(command); return(new HttpResult(HttpStatusCode.OK)); }