public void Handle(UpdateDefaultFavoriteAddress command) { var company = _repository.Get(AppConstants.CompanyId); company.UpdateDefaultFavoriteAddress(command.Address); _repository.Save(company, command.Id.ToString()); }
public object Put(DefaultFavoriteAddress request) { var command = new UpdateDefaultFavoriteAddress(); Mapper.Map(request, command); command.Address.Id = request.Id; _commandBus.Send(command); return(string.Empty); }