-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Hello! I've been experimenting with your library in .NET 8 and I really like it - I'll cut straight to the chase:
Line 205 in 634737e
| return attrAccessor[MappingAttributeNames.LinqToDbFieldMapAttributePropertyName].ToString(); |
Has a minor bug where it presumes that the Attribute name is required, it is not. When calling ToString on the Dictionary indexer throws the NullReferenceException
Example:
[Table("AppHit")]
public partial class AppHit
{
[Key]
[Column("HitID")]
public Guid HitId { get; set; }
[Column("SessionID")]
public Guid SessionId { get; set; }
// Issue => Name Optionally set
[Column(TypeName = "datetime")]
public DateTime Timestamp { get; set; }
}In cases such as these I believe it would be acceptable to fall back to propInfo.Name.
Unfortunately, .NET developers using Database First projects cannot force the Name to be required, as the above file is generated automatically.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers