i have created a simple database (just one table) with EF Code First approach. I am hosting the database on Azure. Now i want to insert some data from my local machine but the connection (via internet) is very slow. Even when i use normal SqlCommands without EF to insert data the performance is still slow but about 10 times faster than EF.
Here is my Insert Code:
using (InfoContext ctx = new InfoContext(dbs))
{
ctx.Database.ExecuteSqlCommand("DELETE FROM Entries");
ctx.dbsEvents.AddRange(list);
ctx.SaveChanges();
}
From my point of view the code as simple as it is seems right, so the problem must be the azure db connection. I am using the Basic Tier with 5 DTU's which should be enough i guess. Any ideas what i can do to increase azure db connection speed or whats another, faster way to upload data to azure db?