Base solution for your next web application
Open Closed

Duplicated values when seeding AbpUserAccounts table #3545


User avatar
0
soonjoo created

I just downloaded the asp.net zero template, and did a migration. Everything done successfully without any issues. However, I notice there are duplicated values inside the AbpUserAccounts table. This is a fresh migration.

Is this a bug or am I missing something, or its meant to be like this? Thanks.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Do you run multiple startup projects while debugging your app ? If so, both projects are trying to seed same data and they insert duplicate data to your database.

    If you run one of two projects once, this problem will not happen.

    Thanks.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    soonjoo created

    hello, i am following the instructions of the startup guide. this is using a new project which i downloaded from your website its easy to reproduce also. i change the connection string to use a new database, run the update-database command. then i start the project locally. i immediately check the db and have duplicate value in AbpUserAccounts table

    thanks

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @soonjoo,

    This is not the expected case actually. Let us check it and get back to you. You can follow it here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/322">https://github.com/aspnetzero/aspnet-ze ... issues/322</a>

    Thanks.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)