public void AddToCart(StockItem item) { using (eToolsSystemContext context = new eToolsSystemContext()) { StockItem added = null; added = context. } }
public void StockItem_Update(StockItem selectedStockItem) { using (eToolContext context = new eToolContext()) { context.Entry<StockItem>(context.StockItems.Attach(selectedStockItem)).State = System.Data.Entity.EntityState.Modified; context.SaveChanges(); } }