efcore
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
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