ApiAuthorizationDbContext PrimaryKey to int

Viewed 582

I want to change primary key of AspNetUsers from string to int.

    public class ApplicationUser : IdentityUser<int>
        {
            public short FactoryId { get; set; }
            public Factory Factory { get; set; }
        }

But compiler is not happy about it:

public class ApplicationDbContext : ApiAuthorizationDbContext<ApplicationUser>{

}

it says:

type 'Domain.Identity.ApplicationUser' cannot be used as type parameter 'TUser' in the generic type or method 'ApiAuthorizationDbContext'. There is no implicit reference conversion from 'Domain.Identity.ApplicationUser' to 'Microsoft.AspNetCore.Identity.IdentityUser'.

Any idea?

0 Answers
Related