efcore icon indicating copy to clipboard operation
efcore copied to clipboard

Fix to #30028 - Added nullable property to Json mapped model resulting in errors instead of mapping non existing json property to null

Open maumar opened this issue 2 years ago • 0 comments

Problem was that we when accessing inner property on a JsonElement we used GetProperty. If property is not present (which should be allowed if we try to access optional navigation) KeyNotFound is thrown.

Fix is to use TryGetProperty instead to gracefully handle this scenario.

Fixes #30028

maumar avatar Jan 20 '23 02:01 maumar