EntityFramework.MemoryJoin icon indicating copy to clipboard operation
EntityFramework.MemoryJoin copied to clipboard

Fix .NET 7.0

Open AlexanderPro opened this issue 2 years ago • 2 comments

Hi,

The library has an exception for .NET 7.0. This PR should fix it.

System.MissingMethodException: Method not found: 'System.String Microsoft.EntityFrameworkCore.RelationalPropertyExtensions.GetColumnName(Microsoft.EntityFrameworkCore.Metadata.IProperty)'.
   at EntityFramework.MemoryJoin.Internal.EFHelper.GetKeyProperty(DbContext context, Type t)
   at EntityFramework.MemoryJoin.Internal.MappingHelper.GetEntityMapping[T](DbContext context, Type queryClass, Dictionary`2 allowedPropertyMapping)
   at EntityFrameworkCore.MemoryJoin.MemoryJoiner.FromLocalList[T](DbContext context, IList`1 data, Type queryClass, ValuesInjectionMethod method)
   at EntityFrameworkCore.MemoryJoin.MemoryJoiner.FromLocalList[T](DbContext context, IList`1 data, Type queryClass)
   at EntityFrameworkCore.MemoryJoin.MemoryJoiner.FromLocalList[T](DbContext context, IList`1 data)

AlexanderPro avatar Feb 02 '23 15:02 AlexanderPro

I am running into the same error with .net 7 - any chance this PR can get approved?

johnkwaters avatar Mar 13 '23 18:03 johnkwaters

For those that can migrate to another library, https://github.com/Noticia-Systems/Noticia.EntityFrameworkCore.MemoryJoin supports .NET7. It is based on EntityFramework.MemoryJoin and the queries are parametrized.

pacoteinnov avatar Mar 17 '23 17:03 pacoteinnov