I'm trying to run this sample codes - https://marcominerva.wordpress.com/2017/10/25/using-sqlclient-apis-and-dapper-with-fall-creators-update-sdk/
I imported their database as well but not sure why it keep appearing System.Data.SqlClient.SqlException. enter image description here
I already clean and build my solution and it doesn't work still
public sealed partial class MainPage : Page
{
// public string ConnectionString { get; set; } =
private string connectionString =@"Data Source=LAPTOP-IQQCR1C1;Initial Catalog = DatabaseDemo; Persist Security Info=True;User ID = xxxx Password=xxxxxxx";
//public string ConnectionString { get => connectionString; set => connectionString = value; }
public MainPage()
{
this.InitializeComponent();
}
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
var cities = await GetCitiesAsync(); //THIS LINE OF CODES GIVE THE SYSTEM.DATA.SQLCLIENT.SQLEXCEPTION
CitiesComboBox.ItemsSource = cities;
CitiesComboBox.SelectedIndex = 0;
base.OnNavigatedTo(e);
}
It still runs. But can't read the data for the dropdown and when searched, cannot read images from database.
Output: sample
What I want: sample