I would like to insert data from xml files to sql database. In my xml files are a lot of diffrent rows. But many rows contain empty double values. When i try to add this to my database i get an error.
Here is a short cut from my database insert:
Table<Step> step = Accessor.GetStepTable();
Step stp = new Step();
stp.Angle1Actual = stepData.Columns.Contains("Angle1Actual") ? double.Parse(stepData.Rows[index][Array.IndexOf(argsStep, "Angle1Actual")].ToString()) : DBNull.Value;
step.InsertOnSubmit(stp);
step.Context.SubmitChanges();
The problem is the DBNull is diffrent type