MySQL Forums
Forum List  »  MySQL for Visual Studio

How to change primary key for Identity with MySQL as storage provider
Posted by: Shyamal Parikh
Date: August 14, 2015 12:09PM

I followed this link

and worked out how to make MySQL work with aspnet.Identity 2.2.1

However, as soon as I try follow the link:

I come to this instruction -->

Change the context class and user manager to use the key type

In IdentityModels.cs, change the definition of the ApplicationDbContext class to use your new customized classes and an int for the key, as shown in the highlighted code.

public class ApplicationDbContext : IdentityDbContext<ApplicationUser, CustomRole,
int, CustomUserLogin, CustomUserRole, CustomUserClaim>

However, for MySQL storage provider to work as per

I had changed the above code from

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>

public class ApplicationDbContext : MySQLDatabase

So here, I am facing a problem, there is no extension that MySQLDatabase accepts as IdentityDbContext does. Can anyone please help me out here?

Options: ReplyQuote

Written By
How to change primary key for Identity with MySQL as storage provider
August 14, 2015 12:09PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.