{"action":"closed","issue":{"url":"https://api.github.com/repos/aspnet/Identity/issues/1864","repository_url":"https://api.github.com/repos/aspnet/Identity","labels_url":"https://api.github.com/repos/aspnet/Identity/issues/1864/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Identity/issues/1864/comments","events_url":"https://api.github.com/repos/aspnet/Identity/issues/1864/events","html_url":"https://github.com/aspnet/Identity/issues/1864","id":339141041,"node_id":"MDU6SXNzdWUzMzkxNDEwNDE=","number":1864,"title":"Can't configure Identity","user":{"login":"CeelMarten","id":39693238,"node_id":"MDQ6VXNlcjM5NjkzMjM4","avatar_url":"https://avatars0.githubusercontent.com/u/39693238?v=4","gravatar_id":"","url":"https://api.github.com/users/CeelMarten","html_url":"https://github.com/CeelMarten","followers_url":"https://api.github.com/users/CeelMarten/followers","following_url":"https://api.github.com/users/CeelMarten/following{/other_user}","gists_url":"https://api.github.com/users/CeelMarten/gists{/gist_id}","starred_url":"https://api.github.com/users/CeelMarten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CeelMarten/subscriptions","organizations_url":"https://api.github.com/users/CeelMarten/orgs","repos_url":"https://api.github.com/users/CeelMarten/repos","events_url":"https://api.github.com/users/CeelMarten/events{/privacy}","received_events_url":"https://api.github.com/users/CeelMarten/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-07T12:02:52Z","updated_at":"2018-07-07T12:44:30Z","closed_at":"2018-07-07T12:44:30Z","author_association":"NONE","body":"I have a class **ApplicationUser**  witch inherited from **IdentityUser<long>**\r\n```\r\n    public class ApplicationUser : IdentityUser<long>\r\n    {\r\n    }\r\n```\r\nand I want to use it in **ApplicationDbContext** \r\n```\r\n    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>\r\n    {\r\n        public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)\r\n            : base(options)\r\n        {\r\n        }\r\n\r\n        protected override void OnModelCreating(ModelBuilder builder)\r\n        {\r\n            base.OnModelCreating(builder);\r\n        }\r\n    }\r\n```\r\n\r\nVisual Studio says that I can't use **ApplicationUser** because there is no implicit reference conversion from **ApplicationUser** to **IdentityUser**. I found this in github where \r\n\r\n```\r\n      services.AddIdentity<ApplicationUser, IdentityRole>()\r\n                .AddEntityFrameworkStores<ApplicationDbContext, long>()\r\n                .AddDefaultTokenProviders();\r\n```\r\nthe solution is to change code from  \r\n`.AddEntityFrameworkStores<ApplicationDbContext>()` to `.AddEntityFrameworkStores<ApplicationDbContext, long>()`\r\nbut there is not overload for this method\r\n"}}
{"actor":{"display_login":"CeelMarten"}}