public void UpdateProductsenn(int id) { Product p = _context.Products.Find(id); p.NumberSeen += 1; _context.SaveChanges(); }
public int AddCategory(Category category) { _context.Categories.Add(category); _context.SaveChanges(); return(category.Id); }