public static void CreateOne(Product product) { string commandText = ( $"INSERT INTO Products" + $"(ProductName, Price, BrandId, SubCategoryId) " + $"VALUES ('{product.ProductName}','{product.Price}','{product.BrandId}','{product.SubCategoryId}')"); SQLExecution.ExecuteCommand(commandText); }
public static void DeleteOne(Product product) { var commandText = $"DELETE FROM Products Where ProductId = {product.ProductId}"; SQLExecution.ExecuteCommand(commandText); }