Deploying MVC project to Azure - 'Close but no cigar'

Dean Everhart 1,536 Reputation points
2021-09-07T14:59:31.587+00:00

Having some difficulty deploying MVC project to Azure.

I believe the structure of the database deployed based on the Package Manager Console Log

Not only does the first page of website work, but the links on the active webpage navigate to the proper database views.

I can access the database structure on Azure through Microsoft SQL Management Studio, but no data appears.

Anyone know what should I check next?

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,417 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,071 Reputation points
    2021-09-08T03:02:21.343+00:00

    Hi @DeanAndrewEverhart-9294 ,
    I think you could try the following approach.
    1.First you need to apply migrations and specify the last one.

    PM> Update-Database -TargetMigration AnyMigrationName  
    
    # It updates database to a migration named "AnyMigrationName"  
    # This will apply migrations if the target hasn't been applied or roll back migrations  
    # if it has  
    

    2.When your local database is updated you simply add new migration.

    PM> Add-Migration NewMigrationName  
    
    # it scaffolds a new migration named "NewMigrationName"   
    

    Best regards,
    Yijing Sun


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.