Look at nullable annotations when retrieve single row
Closed this issue · 0 comments
kant2002 commented
When generation of code for nullable context, nullability of result type should affects if generated FirstOrDefault
or simply 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