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 FillClientData(Client client)
        {
            var clientDataIsInvalid = true;
            string currentData = string.Empty;

            do
            {
                Console.Write("Enter count of visits: ");
                currentData = Console.ReadLine();
                int countOfVisits = 0;

                if (int.TryParse(currentData, out countOfVisits))
                {
                    client.CountOfVisits = countOfVisits;
                    clientDataIsInvalid = false;
                }
                else
                {
                    Console.WriteLine("Count of visits must be integer number");
                }

            } while (clientDataIsInvalid);
        }