# Step 2: Add a Data Source

## Content

1. After creating the WPF application, select **View** \> **Other Windows** \> **Data Sources** from Visual Studio.
2. In the Data Sources panel, click **Add New Data Source** to launch the **Data Source Configuration Wizard**, select **Database**, and then click **Next**.
    ![image](https://cdn.mescius.io/document-site-files/images/c76ee3c1-6329-4804-9e96-99555f506bc5/image.df5f14.png)
3. Select Dataset as the data model, and then click Next.
    ![image](https://cdn.mescius.io/document-site-files/images/c76ee3c1-6329-4804-9e96-99555f506bc5/image.bad9ef.png)
4. Click **New Connection**. In the **Add Connection** dialog, set the **Server name**, connect to the SQL Server sample database Adventure Works, and then click OK.
    ![image](https://cdn.mescius.io/document-site-files/images/c76ee3c1-6329-4804-9e96-99555f506bc5/image.af7ae7.png)
5. Save the connection string with the name **AdventureWorks2019ConnectionString**, and then click Next.
    ![image](https://cdn.mescius.io/document-site-files/images/c76ee3c1-6329-4804-9e96-99555f506bc5/image.24998e.png)
6. Select the **ProductPhoto** table as the database object, and then click **Finish**.
    ![image](https://cdn.mescius.io/document-site-files/images/c76ee3c1-6329-4804-9e96-99555f506bc5/image.d5f89a.png)
7. View the added data source in the Data Sources window of Visual Studio.
    ![image](https://cdn.mescius.io/document-site-files/images/c76ee3c1-6329-4804-9e96-99555f506bc5/image.0bba0c.png)

 