Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

creating database #1590


User avatar
0
dsalodki created

I run project in debug and have error. Additional information: CREATE DATABASE statement not allowed within multi-statement transaction. What I do wrong?


5 Answer(s)
  • User Avatar
    0
    omital created

    for solve this problem you can follow one of this approach: 1- Create empty database manually 2- run update-database command in nugget packager

  • User Avatar
    0
    rhuseman89 created

    I am having the same problem. I have manually created the database in my localhost, where my connection string says it should be. I try to run the "Update-database" in the entityFramework project as show in the pictures. What is going wrong??

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I think localhost and "(localDb)\MSSQLLocalDb" is not same. Can you try to use "(localDb)\MSSQLLocalDb" instead of localhost in your connectionString ?

  • User Avatar
    0
    cicciottino created

    i had this problem too and i've solved issued Update-Database command. Any idea what this problem is caused from?

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    There might be more than one reason. It's really hard to understand only with that error message ?

    Do you still have the problem ? We can try to solve it, if you still having the problem.