Breezy
Breezy copied to clipboard
Nullable type cause generate incorect code
So i declare my Entity has nullable property like
[Table("Config")]
public class Config
{
public string Key { get; set; } = string.Empty;
// --snifff----//
public int? OrganizationId { get; set; } // <-- this nullable int cause trouble
}
and look at generated code i can see the problem
// a bunch of generated code before
var organizationId = (Nullable)reader.GetInt32(6); // <-- this strange Nullable cast
if i remove ? and make it nonnullable then it run fine
project: asp.net core 8 minimal api