Help using SQLSPatial

Topics: SharpMap v2.0
Aug 29, 2014 at 5:55 PM
I'm trying to get features to show up on a map, but it comes up blank. I can see by my messagebox that It is reading 8 features. I suspect I'm close, can anyone point me in the right direction? Here is my code:


InitializeComponent();
        SharpMap.Layers.VectorLayer vlay = new SharpMap.Layers.VectorLayer("States");
        vlay.DataSource = new SharpMap.Data.Providers.MsSqlSpatial("Integrated Security=SSPI;Persist Security Info=False;User ID=KCSPackage;Initial Catalog=DEMO;Data Source=BDP5SY1", "Demo", "SHAPE","ID");
        vlay.DataSource.Open();
        //vlay.DataSource.SRID=4326;
        MessageBox.Show(vlay.DataSource.GetFeatureCount().ToString());


        mapBox1.Map.Layers.Add(vlay);
        mapBox1.Map.ZoomToExtents();            
        mapBox1.Refresh();