You will have to generate a script of this MDF
file and connect to the Azure database using SQL Server Management Studio. The procedure is kind of big and would not fit in the answer (it would have to be a separate answer just for that). As a curiosity, this link has the step-by-step of how to attach your MDF
to an instance of SQL Server ( link ).
Remembering that Azure can not attach a .mdf file. The simplest way is to have SQL SErver Management Studio and use the deploy option of your SQL Azure database.
Alternatively, you can set the Seed
method of your Migrations\Configuration.cs
file so that the data is inserted into your Azure cloud's publishing system:
internal sealed class Configuration : DbMigrationsConfiguration<Models.ApplicationDbContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
ContextKey = "SeuSistema.Models.ApplicationDbContext";
}
protected override void Seed(SeuSistema.Models.ApplicationDbContext context)
{
// This method will be called after migrating to the latest version.
// You can use the DbSet<T>.AddOrUpdate() helper extension method
// to avoid creating duplicate seed data. E.g.
//
// context.People.AddOrUpdate(
// p => p.FullName,
// new Person { FullName = "Andrew Peters" },
// new Person { FullName = "Brice Lambson" },
// new Person { FullName = "Rowan Miller" }
// );
//
}
}