Question: I don't have ADO.NET when I click add item in Visual Studio. I have several versions installed in my computer. In some of them, I have ADO.NET so how to download ADO.NET separately?
[![enter image description here](https://i.stack.imgur.com/2jTTo.png)](https://i.stack.imgur.com/2jTTo.png)

Answer: 
You should use MVC pattern, use delegate, when fetched data from url reload your pickerView.

Here is my protocol:

```
protocol DataSourceDelegate {
    func categoriesLoaded(categories: [Category])
}

```

And here is my fetch function: 

```
func loadCategories(monthID: Int) {
        let session = URLSession.shared
        let request = URLRequest(url: URL(string: "http://manage.littlesleeperapp.com/api/v1/tip_category/get_categories_tips_by_segment_id/\(monthID)")!)
        session.dataTask(with: request) { (data, response, error) in
            if (response as? HTTPURLResponse) != nil {
                let jsonData = try! JSONDecoder().decode(Dictionary<String, [Category]>.self, from: data!)
                let categories = jsonData["data"]!
                self.categories = categories
                self.delegate?.categoriesLoaded(categories: categories)
            }
            }.resume()
    }

```

When fetch done categoriesLoaded delegate called.

And reload tableView

```
extension TipsViewController: DataSourceDelegate {
    func categoriesLoaded(categories: [Category]) {
        DispatchQueue.main.async {
            self.categories = categories
            self.myTableView.reloadData()
            self.activityIndicator.stopAnimating()
        }
    }
}

```
After you get data from server, maybe you need to reload pickerView
if it doesn't work, check after get data, pickerView's delegate is run or not