- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 158
Problem with AppDbContext derived from IdentityDbContext #249
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
Comments
So, this is the problem area: JsonApiDotNetCore/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs Lines 136 to 146 in e30f911
I'm not sure right now why this was ever working. The correct behavior would be to log a warning rather than throw the exception. The reason it fails with the services.AddJsonApi(options => {
options.BuildContextGraph((builder) => {
builder.AddResource<MyModel>("my-models");
});
}, mvcBuilder); https://json-api-dotnet.github.io/#/context-graph I will work on having a fix in v2.2.1 as soon as possible. |
For me this temporary solution is ok until it is fixed. |
fix(ContextGraphBuilder): don't throw if DbContext contains non json:api resource
@milosloub please upgrade to 2.2.1 and let me know if that solves your problem. |
@jaredcnance Wow, that was fast. After upgrade it works perfectly. Thank you |
Hello,
after update from 2.1.11 to 2.2, there si error in Startup.cs inicialization:
services.AddJsonApi<AppDbContext>
Stack trace:
If AppDbContext derived from DbContext, everything is ok, but my AppDbContext derived from IdentityDbContext<User,Role,int>.
Can you make some investigation? Thank you.
The text was updated successfully, but these errors were encountered: