Closed kant2002 closed 2 years ago
When generation of code for nullable context, nullability of result type should affects if generated FirstOrDefault or simply First,
FirstOrDefault
First
consider following definition
[SqlMarshal("sp")] public partial Totals GetTotals();
produces
public partial Totals GetTotals() { ... return this.dbContext.Totals.FromSqlRaw(sqlQuery, parameters).AsEnumerable().FirstOrDefault(); ... }
which trigger nullability warnings
When generation of code for nullable context, nullability of result type should affects if generated
FirstOrDefault
or simplyFirst
,consider following definition
produces
which trigger nullability warnings