August 2018
Intermediate to advanced
298 pages
5h 33m
English
Follow these steps to deploy Rest Buy to Azure:
public class RestBuyContext : DbContext{ const string hiloName = "order_hilo"; const string productTable = "Product"; const string orderTable = "Order"; const string orderItemTable = "OrderItem"; const string userTable = "User"; static bool initialized;......}/// rest of the code remains the same
Basically in the code, we added a static initialized property that is called only the very first time when our constructor is invoked. We don't want to check if migrations are applied each time we create our context; rather we want it once per application start. The Database.Migrate() method ensures that necessary migrations are applied. ...
Read now
Unlock full access