Re: aspcore.identity with MySQL database
Posted by: mario andreis
Date: August 29, 2016 09:12AM

public void ConfigureServices(IServiceCollection services)
// Add framework services.

services.AddDbContext<ApplicationDbContext>(options =>

services.AddIdentity<ApplicationUser, IdentityRole>()


// Add application services.
services.AddTransient<IEmailSender, AuthMessageSender>();
services.AddTransient<ISmsSender, AuthMessageSender>();

public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options)
: base(options)

protected override void OnModelCreating(ModelBuilder builder)
// Customize the ASP.NET Identity model and override the defaults if needed.
// For example, you can rename the ASP.NET Identity table names and more.
// Add your customizations after calling base.OnModelCreating(builder);



Options: ReplyQuote

Written By
Re: aspcore.identity with MySQL database
August 29, 2016 09:12AM

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.