public void CreateProduct(Product product) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Add(product); ctx.SaveChanges(); } }
public void CreateCategory(Category category) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Add(category); ctx.SaveChanges(); } }
public void CreateBrand(Brand brand) { using (var ctx = new FreeSmokyMarketContext()) { ctx.Add(brand); ctx.SaveChanges(); } }