Base solution for your next web application
Open Closed

Error - add a new table #8379


User avatar
0
rnguyen created

Hi,

I follow your instruction but could not add a new table

https://docs.aspnetzero.com/en/aspnet-core-mvc/latest/Developing-Step-By-Step-Core-Creating-Person-Entity

Here is my code and I could not compile

If I change to this

then I got this error when run PM console

Regards,

Robert


14 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hi

    You should use public class PhoneBookDemoDbContext : AbpZeroDbContext<Tenant, Role, User, PhoneBookDemoDbContext>.

    Can you share the project with me? [email protected]

  • User Avatar
    0
    rnguyen created

    yes, i can share my project. are you availabe now?

  • User Avatar
    0
    maliming created
    Support Team

    Yes, please.

  • User Avatar
    0
    rnguyen created

    I am ready.

    How can I share my project to you?

  • User Avatar
    0
    maliming created
    Support Team

    Please send the project to my email. [email protected]

  • User Avatar
    0
    rnguyen created

    My project from download version 8.1 mvc .net core with Jquery. I try to ladd a new table. I will zip the src and send to you.

  • User Avatar
    0
    rnguyen created

    Sorry, it's too big for me to send (382mb zip file)

  • User Avatar
    0
    rnguyen created

    do you have FTP for me to upload?

  • User Avatar
    0
    maliming created
    Support Team

    run Delete-BIN-OBJ-Folders.bat & delete node_modules then zip it.

  • User Avatar
    0
    rnguyen created

    just run the batch file to delete all obj and still got the same error

  • User Avatar
    0
    maliming created
    Support Team

    run Delete-BIN-OBJ-Folders.bat & delete node_modules then zip it and send to me.

  • User Avatar
    0
    rnguyen created

    ok, just send to you (60mb)

  • User Avatar
    0
    maliming created
    Support Team

    hi

    You should put the Person entity in AixemDbContext, there is no need to create a new PhoneBookDemoDbContext. then delete PhoneBookDemoDbContext.

  • User Avatar
    0
    rnguyen created

    ok, it works.

    Thank you!