core-admin
core-admin copied to clipboard
Not working with EntityFrameWork 9.0.0 and .net 8.0.300 Versions (I am a newbie in .NET )
An unhandled exception occurred while processing the request. MissingMethodException: Method not found: 'System.Collections.Generic.List`1<Microsoft.EntityFrameworkCore.Metadata.RuntimeForeignKey> Microsoft.EntityFrameworkCore.Metadata.RuntimeProperty.get_ForeignKeys()'. DotNetEd.CoreAdmin.Controllers.CoreAdminDataController.GetDbSetValueOrNull(string dbSetName, out DbContext dbContextObject, out Type typeOfEntity, out Dictionary<string, Dictionary<object, string>> relationships)
There is a breaking change in the framework, download the repo and edit below and reference the changed DotNetEd.CoreAdmin.csproj from your project until an updated nuget package is published.
Change line 92 to var typeOfChild = f.ForeignKeys.First(); DotNetEd.CoreAdmin\Controllers\CoreAdminDataController.cs
ForeignKeys[0] is no longer a valid accessor as it has no indexer
There is a breaking change in the framework, download the repo and edit below and reference the changed DotNetEd.CoreAdmin.csproj from your project until an updated nuget package is published.
Change line 92 to var typeOfChild = f.ForeignKeys.First(); DotNetEd.CoreAdmin\Controllers\CoreAdminDataController.cs
ForeignKeys[0] is no longer a valid accessor as it has no indexer
It's not work.
i try to update EntityFrameworkCore package to 9.0.0.0 and it finally work.
Alright full guide so you don't have to struggle for three hours like me:
- First remove the package
- download or clone the repo.
- extract the DotNetEd.CoreAdmin folder from the project: \core-admin-master\core-admin-master\src\ and place it in the same folder as the rest or your projects: source\repos\ Do NOT put it in your project folder
- Add this to your existing project by right-clicking the Solution in the Solution explorer and then going to the Add option - Exsisting Project - then navigate to \source\repos\DotNetEd.CoreAdmin\ and click on the DotNetEd.CoreAdmin.csproj file
- Then you need to clean and rebuild the project.
- go to the DotNetEd.CoreAdmin\Controllers\CoreAdminDataController.cs file and change line 92 to var typeOfChild = f.ForeignKeys.First();
- Now you need to go and update the dependencies for the DotNetEd.CoreAdmin solution make sure to update the EntityFrameworkCore package to at least 9.0.0.0
Then you should be done!