private void Checkout()
        {
            try
            {
                var firstBranch = _dataSource.Branches.GetAll().FirstOrDefault();
                var order = new Order();
                var client = new Client();
                var equipment = new Equipment();
                var contactDetails = new ContactDetails();

                Console.WriteLine();
                FillContactDetailsData(contactDetails);
                FillEquipmentData(equipment);
                FillClientData(client);
                FillOrderData(order);

                using (var transaction = GetTransactonScopeReadCommited())
                {
                    var newContactDetails = _dataSource.ContactDetails.Create(contactDetails);
                    _dataSource.Save();

                    client.ContactDetailsId = newContactDetails.Id;
                    var newClient = _dataSource.Clients.Create(client);
                    _dataSource.Save();

                    order.ClientId = newClient.Id;
                    order.BranchId = firstBranch.Id;
                    var newOrder = _dataSource.Orders.Create(order);
                    _dataSource.Save();

                    equipment.OrderId = newOrder.Id;
                    var newEquipment = _dataSource.Equipments.Create(equipment);
                    _dataSource.Save();

                    transaction.Complete();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception occured on checkout.");
                Console.WriteLine($"{ex.Message}");
                throw;
            }
        }
        private void FillOrderData(Order order)
        {
            string currentData = string.Empty;
            var orderDataIsInvalid = true;

            do
            {
                Console.Write("Enter billing amont: ");
                currentData = Console.ReadLine();
                int billingAmount = 0;

                if (int.TryParse(currentData, out billingAmount))
                {
                    order.BillingAmount = billingAmount;
                    orderDataIsInvalid = false;
                }
                else
                {
                    Console.WriteLine("Billing amount must be integer number");
                }

            } while (orderDataIsInvalid);

            orderDataIsInvalid = true;

            do
            {
                var startDate = EnterDate("Enter start day");
                var endDate = EnterDate("Enter end day");

                if (startDate <= endDate)
                {
                    orderDataIsInvalid = false;
                    order.ServiceStartDay = startDate;
                    order.ServiceEndDay = endDate;
                }
                else
                {
                    Console.WriteLine("End date must be greater than start date.");
                }
            } while (orderDataIsInvalid);
        }