neisbut / EntityFramework.MemoryJoin

Extension for EntityFramework for joins to in-memory data
MIT License
56 stars 24 forks source link

Support for edmx entities #22

Open mariophill opened 3 years ago

mariophill commented 3 years ago

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());