I have empty database (no tables) and I want to use Update-Database to create all tables from my models. So, I have added an initial migration which shows all tables which I have to add to database.
My connectionstring is: Data Source=webhw27.htx-net.pl,51433;Initial Catalog=1832_testowa;Integrated Security=false;User ID=1832_admin;Password=******;Encrypt=True;TrustServerCertificate=True
During Update-Database I get
CREATE DATABASE permission denied in database 'master'
Why is it trying to create database master while I want to update 1832_testowa
db? I also added Database.SetInitializer<ApplicationDbContext>(null);
to Global.asax
which I found in another topic - still the same.
In hosting panel I set this db to user 1832_admin
as default - still the same problem.
I also added this connection to Visual Studio Server Explorer and I can easly create any table in this database manualy.
Where is the problem, why I can't use Update-Database
to migrate now (and in future if I'll have to add something)?