Пример #1
0
        public async Task Update(WaitListDto model)
        {
            var basketContent = new StringContent(JsonConvert.SerializeObject(model), System.Text.Encoding.UTF8, "application/json");

            var response = await _apiClient.PostAsync("", basketContent);

            _kitchenSender.SendWaitList(model);
            response.EnsureSuccessStatusCode();
        }
Пример #2
0
        public void SendWaitList(WaitListDto customer)
        {
            var factory = new ConnectionFactory()
            {
                HostName = _hostname, UserName = _username, Password = _password
            };

            using (var connection = factory.CreateConnection())
                using (var channel = connection.CreateModel())
                {
                    channel.QueueDeclare(queue: _queueName, durable: false, exclusive: false, autoDelete: false, arguments: null);

                    var json = JsonConvert.SerializeObject(customer);
                    var body = Encoding.UTF8.GetBytes(json);

                    channel.BasicPublish(exchange: "", routingKey: _queueName, basicProperties: null, body: body);
                }
        }
 public Service.Products.Model.WaitList CreateUpdate(WaitListDto model)
 {
     return(new Model.WaitList(model.Title, model.Image, model.Description, model.CreatorUserId, model.CreationTime, model.LastModifierUserId, model.LastModificationTime, model.DeleterUserId, model.DeletionTime, model.IsDeleted, model.OrganizationUnitId));
 }
Пример #4
0
 public async System.Threading.Tasks.Task Update(WaitListDto model)
 {
     await _waitList.UpdateAsync(_waitListAdapterCommandService.CreateUpdate(model));
 }