Example #1
0
        public void Handle(UpdateDefaultFavoriteAddress command)
        {
            var company = _repository.Get(AppConstants.CompanyId);

            company.UpdateDefaultFavoriteAddress(command.Address);
            _repository.Save(company, command.Id.ToString());
        }
Example #2
0
        public object Put(DefaultFavoriteAddress request)
        {
            var command = new UpdateDefaultFavoriteAddress();

            Mapper.Map(request, command);
            command.Address.Id = request.Id;

            _commandBus.Send(command);

            return(string.Empty);
        }