Column("")] on stored procs result models .NET 10 compatibility?

Hi Team Radzen,

We have stored procs that return a value without a column name (e.g. SELECT SCOPE_IDENTITY() for a new ID, or SELECT 0/1 as status).
RBS scaffolds these with [Column("")] on the placeholder property.

On .NET 10, DbContext init throws:

System.ArgumentException: The value cannot be an empty string... (Parameter 'name')
   at ColumnAttribute..ctor(String name)

ColumnAttribute now validates the name with ThrowIfNullOrWhiteSpace; earlier versions accepted empty strings. Removing the attribute manually works, but comes back on every re-scaffold.

Is this a known issue and can we expect a scaffolder fix?, or is the recommended path to alias the return value in the proc (SELECT SCOPE_IDENTITY() AS NewId)? and/or remove the [Column("")] attribute from all affected scaffolded files?

Thanks!
Mehmet

We will handle this internally to not generate Column attribute for empty strings.

1 Like