Here's what I needed:
public static ObservableCollection<Goods> List { get; set; }
private const string stringConnection = @"Data Source = 111.111.11.11; Initial Catalog = Market; User Id = Ivan; Password = 1234567890";
private const string sqlQuery = "uSp_NameOfStoredProcedure";
private static void GetGoods()
{
List = new ObservableCollection<Goods>();
using (SqlConnection con = new SqlConnection(stringConnection))
{
con.Open();
using (SqlCommand command = new SqlCommand(sqlQuery, con))
{
command.CommandType = CommandType.StoredProcedure;
using (SqlDataReader reader = command.ExecuteReader())
{
while (reader.Read())
{
Goods g = new Goods()
{
ID = reader.GetInt64(0),
Name = reader.GetString(1),
Price = reader.GetString(2),
};
List.Add(g);
}
}
}
}
}