WahidBitar / EF-Core-Simple-Graph-Update

Update an aggregate graph with all related entities
Apache License 2.0
24 stars 3 forks source link

Method not found: 'Microsoft.EntityFrameworkCore.Metadata.INavigation Microsoft.EntityFrameworkCore.ChangeTracking.NavigationEntry.get_Metadata() #2

Closed michael-freidgeim-webjet closed 1 year ago

michael-freidgeim-webjet commented 1 year ago

I am using

<TargetFramework>net6.0</TargetFramework>
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.10" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="6.0.10" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.10">

And install <PackageReference Include="Diwink.Extensions.EntityFrameworkCore" Version="1.0.4" />

But I am getting : System.MissingMethodException HResult=0x80131513 Message=Method not found: 'Microsoft.EntityFrameworkCore.Metadata.INavigation Microsoft.EntityFrameworkCore.ChangeTracking.NavigationEntry.get_Metadata()'. Source=Diwink.Extensions.EntityFrameworkCore StackTrace: at Diwink.Extensions.EntityFrameworkCore.DbContextExtensions.insertUpdateOrDeleteGraph[T](DbContext context, T newEntity, T existingEntity, String aggregateType) at Diwink.Extensions.EntityFrameworkCore.DbContextExtensions.InsertUpdateOrDeleteGraph[T](DbContext context, T newEntity, T existingEntity) at ItineraryList.DataServices.ItinerarySaver.d8.MoveNext() in D:\GitRepos\ItineraryList\src\ItineraryList\DataServices\ItinerarySaver.cs:line 182 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() at ItineraryList.DataServices.ItinerarySaver.d5.MoveNext() in D:\GitRepos\ItineraryList\src\ItineraryList\DataServices\ItinerarySaver.cs:line 73

This exception was originally thrown at this call stack: Diwink.Extensions.EntityFrameworkCore.DbContextExtensions.InsertUpdateOrDeleteGraph(Microsoft.EntityFrameworkCore.DbContext, T, T) ItineraryList.DataServices.ItinerarySaver.AddOrUpdateItineraryAsync(ItineraryList.DataServices.DataContext, ItineraryList.Models.ItineraryListRow) in ItinerarySaver.cs System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) System.Runtime.CompilerServices.TaskAwaiter.GetResult() ItineraryList.DataServices.ItinerarySaver.SaveItineraryAsync(ItineraryList.DataServices.DataContext, ItineraryList.Models.ItineraryListRow, System.DateTime, string) in ItinerarySaver.cs