The key field property is not getting filtered out from the allowedPropertyMapping dictionary values since edmx entities do not have the KeyAttribute. Are you able to filter this out by doing something like the following in the GetEntityMapping method? I tested it out by moving the following code block just below where you get the pkColumnName and adding the filter and it worked.
var allowedProperties = new HashSet(
allowedPropertyMapping.SelectMany(x => x.Value).Where(a => !a.Name.Equals(pkColumnName, StringComparison.OrdinalIgnoreCase)).ToList());
The key field property is not getting filtered out from the allowedPropertyMapping dictionary values since edmx entities do not have the KeyAttribute. Are you able to filter this out by doing something like the following in the GetEntityMapping method? I tested it out by moving the following code block just below where you get the pkColumnName and adding the filter and it worked.
var allowedProperties = new HashSet(
allowedPropertyMapping.SelectMany(x => x.Value).Where(a => !a.Name.Equals(pkColumnName, StringComparison.OrdinalIgnoreCase)).ToList());