Beispiel #1
0
        public Task <FakeOrderIosCommandResponse> Handle(CreateFakeOrderIosCommand command)
        {
            var order = new FakeOrderIos(Guid.NewGuid(), command.FullName, command.CustomerId, command.AddressText,
                                         command.AddressLat, command.AddressLng,
                                         command.Items.Select(item => new FakeOrderIosItem(Guid.NewGuid(), item.ProductId, item.Name, item.Image,
                                                                                           item.Brand, item.Quantity)).ToList());

            _orderRepository.Add(order);
            return(Task.FromResult(new FakeOrderIosCommandResponse()));
        }
 public static IFakeOrderIosDto ToDto(this FakeOrderIos src)
 {
     return(Mapper.Map <IFakeOrderIosDto>(src));
 }