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

Creating Databases in Azure #11957


User avatar
0
4Matrix created

When creating databases in azure, I need to be able to specify options for the database being created using CreateOrMigrateForTenant.

The entity framework tells me that I can do this using the DbContext Model builder like so: https://learn.microsoft.com/en-us/ef/core/providers/sql-server/azure-sql-database

But this is not working, I am not 100% sure if this is an AspNetZero problem or not, it might just be broken. Is this the way you would suggest setting db settings such as the Service Tier or in my case, the elastic pool that I want the new tenant database to be created in?


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @4Matrix

    Do you see any error messages when you run migrations on Azure ? I assume you already added one of these options to your DbContext.

  • User Avatar
    0
    4Matrix created

    Hi @ismcagdas, I don't see any error messages when creating the new database, it just creates the database outside of the Elastic Pool I have specified. It also creates it on a very expensive Tier!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Thanks. ASP.NET Zero doesn't have any specific implementation here. If this works with a classic ASP.NET Core & EF Core app, it should work with ASP.NET Zero as well.

    Maybe you can try same with a classic ASP.NET Core app and see if it works.