0

I have found some links on how to change the table name and one property name in ASP.NET Identity like for example: ASP Identity table column change but mapping is not possible with new column name

modelBuilder.Entity<ApplicationUser>()
                    .Property(p => p.Id)
                    .HasColumnName("UserId");

This is working as expected, but how can I change the names of all columns at once? I

Pinzi
  • 293
  • 6
  • 18
  • Possible duplicate of [How can I change the table names when using Visual Studio 2013 ASP.NET Identity?](https://stackoverflow.com/questions/19460386/how-can-i-change-the-table-names-when-using-visual-studio-2013-asp-net-identity) –  Oct 06 '17 at 07:03
  • @TAHATEMURII: It's not a duplicate, in the link you posted also only one column has been changed. I need to change all column names. I need to have them in upper case letters. – Pinzi Oct 06 '17 at 07:08
  • *but how can I change the names of all columns at once?* you will have to map each `property` to it's correct column name in the database. Just do what you have done for rest of the properties too. – Izzy Oct 06 '17 at 07:19
  • @Izzy: hmm, ok thanks. I thought there must be an easier solution. One further problem I noticed. There is a "Discriminator" column in the Roles, how can I change the name of this column? I cannot access it with .Property(p => p.Discriminator) – Pinzi Oct 06 '17 at 07:27
  • Refer to **[this](https://stackoverflow.com/a/8671867/3793448)** and **[this](https://stackoverflow.com/a/7394154/3793448)** answer. – Izzy Oct 06 '17 at 07:55
  • @Izzy: ok thank you – Pinzi Oct 06 '17 at 08:03

0 Answers0