I am developing one application using asp dot net core 2 using MySql database.Please help me How can i use Asp Net Identity in
I am late to this answer but, this developer has put the whole solution nicely, in this repository.
https://github.com/jasonsturges/mysql-dotnet-core
Putting the relevant code blocks here.
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.Entity(entity => entity.Property(m => m.Id).HasMaxLength(127));
builder.Entity(entity => entity.Property(m => m.ConcurrencyStamp).HasColumnType("varchar(256)"));
builder.Entity>(entity =>
{
entity.Property(m => m.LoginProvider).HasMaxLength(127);
entity.Property(m => m.ProviderKey).HasMaxLength(127);
});
builder.Entity>(entity =>
{
entity.Property(m => m.UserId).HasMaxLength(127);
entity.Property(m => m.RoleId).HasMaxLength(127);
});
builder.Entity>(entity =>
{
entity.Property(m => m.UserId).HasMaxLength(127);
entity.Property(m => m.LoginProvider).HasMaxLength(127);
entity.Property(m => m.Name).HasMaxLength(127);
});
}
This is tested by me on a project i was working on at the time of posting this answer.