Skip to content

Problem with AppDbContext derived from IdentityDbContext #249

Closed
@milosloub

Description

@milosloub

Hello,
after update from 2.1.11 to 2.2, there si error in Startup.cs inicialization:
services.AddJsonApi<AppDbContext>

Type does not implement 'IIdentifiable'\r\nParameter name: resourceType

Stack trace:

at JsonApiDotNetCore.Builders.ContextGraphBuilder.GetIdType(Type resourceType)
at JsonApiDotNetCore.Builders.ContextGraphBuilder.AddDbContextT
at JsonApiDotNetCore.Extensions.IServiceCollectionExtensions.<>c__21.<AddJsonApi>b__2_0(IContextGraphBuilder builder) at JsonApiDotNetCore.Configuration.JsonApiOptions.BuildContextGraph(Action1 builder)
at JsonApiDotNetCore.Extensions.IServiceCollectionExtensions.AddJsonApi[TContext](IServiceCollection services, Action`1 options, IMvcBuilder mvcBuilder)

If AppDbContext derived from DbContext, everything is ok, but my AppDbContext derived from IdentityDbContext<User,Role,int>.

Can you make some investigation? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions