File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
by-language/csharp-npgsql Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ public class BasicPoco
66 public string ? name { get ; set ; }
77 public int ? age { get ; set ; }
88
9- public override bool Equals ( object obj )
9+ public override bool Equals ( object ? obj )
1010 {
11- var other = ( BasicPoco ) obj ;
12- return name == other . name && age == other . age ;
11+ var other = ( BasicPoco ? ) obj ;
12+ return name == other ? . name && age == other ? . age ;
1313 }
1414
1515 public override int GetHashCode ( )
Original file line number Diff line number Diff line change @@ -426,7 +426,7 @@ INSERT INTO testdrive.example (
426426
427427 }
428428
429- public async Task < Point > GeoJsonTypesExample ( )
429+ public async Task < Point ? > GeoJsonTypesExample ( )
430430 {
431431 Console . WriteLine ( "Running GeoJsonTypesExample" ) ;
432432
@@ -444,7 +444,7 @@ public async Task<Point> GeoJsonTypesExample()
444444 // Currently, `InsertGeoJsonTyped` does not work yet.
445445 var obj = reader . GetFieldValue < JsonDocument > ( "geoshape" ) ;
446446 var geoJsonObject = JsonConvert . DeserializeObject < Point > ( obj . RootElement . ToString ( ) ) ;
447- return ( Point ) geoJsonObject ;
447+ return ( Point ? ) geoJsonObject ;
448448 }
449449 }
450450
Original file line number Diff line number Diff line change @@ -223,8 +223,8 @@ public async Task TestGeoJsonTypesExample()
223223
224224 // Validate the outcome.
225225 var coords = new Point ( new Position ( 85.43 , 66.23 ) ) . Coordinates ;
226- Assert . Equal ( coords . Latitude , point . Coordinates . Latitude ) ;
227- Assert . Equal ( coords . Longitude , point . Coordinates . Longitude ) ;
226+ Assert . Equal ( coords . Latitude , point ? . Coordinates . Latitude ) ;
227+ Assert . Equal ( coords . Longitude , point ? . Coordinates . Longitude ) ;
228228
229229 }
230230
You can’t perform that action at this time.
0 commit comments