How to manage null geometric field wising SqlGeometry type?

34 Views Asked by At

I was trying to get geometric value from DB.

SqlGeometry g = new SqlGeometry();
g.Read(new BinaryReader(reader.GetSqlBytes(2).Stream));

this code does not work when the field is null, gives exception.
I'm struggling to find a solution.
Does anybody know a solution?

0

There are 0 best solutions below