Open Closed

toolbar problem #7813


0
wcdagency created

hello

toolbar.png

Create Entity: It works no problem. Regenerate Entity: Sometimes I need add-remove entity, but I could not be able to add. it gives error. Load Entity From Database: Sometimes I prepare database table and I would like to generate class codes from it. it gives error.


8 Answer(s)
  • 0
    yekalkan created

    I could help you if you can more explain the situations which you get errors and also show those errors.

    Regenerate Entity: Sometimes I need add-remove entity, but I could not be able to add. it gives error.

    Did you mean add/remove property?

  • 0
    wcdagency created

    Sometimes for example, I created table with

    table name: abc Id int NameVal string

    and lets say it gave error : nameVal could not be duplicate,

    error message is not important. because what ever the error message is, it could not be repaired.

    If I want to create another table table name :def Id int NameValue: string

    the same error for first one is still displayed, code creates views ,controllers, scripts but database table is not created. Due to this situation, I lost a lot of time. Now, I recloned a clean copy of project , then I will move the codes from non working one to newly cloned one. I still could not get support from you.

  • 0
    yekalkan created

    There should be something wrong with your database and migrations, that causes error when "update-database" command is run. This is also why same error is displayed when you create another entity (because it tries to run "update-database" again).

    I can't test or reproduce this problem using the information you gave, and it doesn't seems to be related with our tool.

    If you like, you can send your project or a sample project with same issue to support@aspnetzero.com as email. I'll check it out.

  • 0
    wcdagency created

    I realized that, when I try to remove an entity , I face that problem. I think I make something wrong. So my question is , les say, I want to completely remove table abc from database and everything in code , thus, what should be the process of it? is there some command for it?

  • 0
    yekalkan created

    There is no command or option for that.

  • 0
    wcdagency created

    hello,

    so what is the appropriate way of it?

  • 0
    yekalkan created

    Search for your entity's name in the solution. Then delete the related files and codes.

    See https://docs.aspnetzero.com/en/common/latest/Development-Guide-Rad-Tool#generated-files

    It can be helpful. There is list of generated files and modified files.

  • 0
    wcdagency created

    hello.

    I fixed problem.

    1. I had to clear all migration files
    2. I had to create two migration file one after other then update db Add-migration migrationismi

    update-database migrationismi