public void Save(string cashierName, int productId, string productName, double price, int beforeQty, int soldQty) { Transaction trans = new Transaction { TimeStamp = DateTime.Now, ProductId = productId, ProductName = productName, Price = price, BeforeQty = beforeQty, SoldQty = soldQty, CashierName = cashierName, }; _db.Transactions.Add(trans); _db.SaveChanges(); }
public void AddProduct(Product product) { _db.Products.Add(product); _db.SaveChanges(); }
public void AddCategory(Category category) { _db.Categories.Add(category); _db.SaveChanges(); }