private static void MigrateProductsTable(ProductContext productContext, SupermarketContext supermarketContext) { var productTable = productContext.Products; var supermarketTable = supermarketContext.Products; foreach (var item in productTable) { var newItem = new Product.Model.Product() { Id = item.Id, VendorId = item.VendorId, ProductName = item.ProductName, MeasureId = item.MeasureId, BasePrice = item.BasePrice }; supermarketTable.Add(newItem); } }
public void Add(Model.Product product) { Products.Add(product.Name, product); }