Don't throw on private and protected properties

This commit is contained in:
Koen
2023-03-16 00:23:06 +00:00
parent 88cebbcabc
commit 2295e29125
3 changed files with 37 additions and 1 deletions
@@ -89,7 +89,7 @@ namespace EntityFrameworkCore.Projectables.Extensions
public static PropertyInfo GetOverridingProperty(this Type derivedType, PropertyInfo propertyInfo)
{
var accessor = propertyInfo.GetAccessors()[0];
var accessor = propertyInfo.GetAccessors(true)[0];
if (!derivedType.CanHaveOverridingMethod(accessor))
{