-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unhandled InvalidOperationException running the EFDemo #346
Comments
I think this particular field needs to be ignored for EFcore. I don't think the demo covers |
Yes, I believe you are correct. My colleague with vastly more knowledge of EF Core took a look at it with me and identified that as the issue. Adding I'll raise a pull request to make the change momentarily. |
This commit adds a line to RulesEngineContext.cs to make Entity Framework Core ignore WorkflowRulesToInject as well as WorkflowsToInject, which resolves an error causing the demo program to crash. This fixes issue #346.
Fixed by PR #347 (I honestly thought GitHub would close this automatically - I must not have used the correct incantation 🤷). |
@cosive-james-cooper thanks for this PR!😊 |
When building and running the demo project, the first three demos all work fine, but the final one, demonstrating interaction with Entity Framework Core, fails with an unhandled
System.InvalidOperationException
. I believe this is the same error mentioned in discussion topic #317.To reproduce the error, the following steps should work:
dotnet run
For reference, this is running on Windows 10 21H1, build number 19043.1645, with .NET version 6.0.202.
I have tried to work out the cause of the issue, but I can't. It occurs on the method call to ensure the database is created, but I can't work out where the WorkflowRulesToInject property is coming from. I'm also not nearly familiar enough with Entity Framework Core to understand the details of the error message. I think it is saying that the IEnumerable cannot be converted into rows in a database table. I further would guess that the strings used probably need to be wrapped in some entity type (which, by my understanding, basically means a type with an
int
field named "Id". I might well be wrong on both points, though.The text was updated successfully, but these errors were encountered: