How to rename Asp .Net Core 2.2 Identity Tables to not have AspNet prefix in EF Core
Not sure if the code below should be considered a hack, but the easiest way of removing the AspNet prefix is to iterate through the models. 1 2 3 4 5 6 7 8 9 10 11 12 protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); foreach (var entityType in modelBuilder.Model.GetEntityTypes()) { var table = entityType.Relational().TableName; if (table.StartsWith("AspNet")) { entityType.Relational().TableName = table.Substring(6); } }; } Found the initial code in a 2014 asp net issue and since copy paste didn’t cut it, did a quick update of the method / property names....