I am trying to publish my database into azure using EF but am not able to see any tables after migration.
I tried below commands:
Add-Migration MyTables
Update-Database
When I check my Azure DB trough SSMS, I can see logs for all the migration in dbo.__EFMigrationsHistory
table, but no table is getting created.
My Context Class:
public class ApplicationContext : DbContext
{
public DbSet<Expense> Expenses { get; set; }
public ApplicationContext(DbContextOptions opts) : base(opts)
{
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
}
}
ConnectionString:
"ConnectionString": { "ExpenseApplicationDB": "Server=tcp:myserver,1432;Initial Catalog=ExpenseDatabase;Persist Security Info=False;User ID={your_username};Password={your_password};MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" }
Also in publish dialog in database section it showing 'No databases found in the project'.
If I try to achieve same thing using local DB than it's working as expected. Is there anything that am doing wrong?