Skip to content

Add null-safe nested member access for mapping and projections - #6

Merged
BenjaminVettori merged 1 commit into
mainfrom
feature/null-handling
Apr 7, 2026
Merged

Add null-safe nested member access for mapping and projections#6
BenjaminVettori merged 1 commit into
mainfrom
feature/null-handling

Conversation

@BenjaminVettori

Copy link
Copy Markdown
Owner

Mapping expressions now automatically handle null intermediate members in property chains. When a member in a nested path is null, Mapify provides a fallback value based on the destination's nullability—returning null for nullable types or a default value for non-nullable types. This applies to both in-memory mapping and IQueryable projections, preventing NullReferenceExceptions at runtime.

+semver: minor

Mapping expressions now automatically handle null intermediate members in property chains. When a member in a nested path is null, Mapify provides a fallback value based on the destination's nullability—returning null for nullable types or a default value for non-nullable types. This applies to both in-memory mapping and IQueryable projections, preventing NullReferenceExceptions at runtime.

+semver: minor
@BenjaminVettori
BenjaminVettori merged commit 8355ea7 into main Apr 7, 2026
1 check passed
@BenjaminVettori
BenjaminVettori deleted the feature/null-handling branch April 7, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant