Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.
This repository was archived by the owner on Apr 19, 2023. It is now read-only.

Map Nullable property using convention #82

@jrshu

Description

@jrshu

When I use the Convention.Properties<T> method to define a convention for a nullable type, it strips the nullable part and uses the underlying type instead:

var underlyingType = Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T);

This causes the properties of any nullable types not to be properly mapped. Is there any reason why you don't want to use the nullable type directly? And is there an alternative preferred way to map nullable properties?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions