Example #1
0
 public static void AddCategory(IntroToEFContexttt db, string categoryName)
 {
     db.Database.ExecuteSqlCommand($"INSERT INTO [Store].[Categories] ([CategoryName]) VALUES ('{categoryName}')");
 }
Example #2
0
 public static void AddProduct(IntroToEFContexttt db, int categoryId, decimal price, string description, string modelName, string modelNumber, decimal unitCost, int quantity)
 {
     db.Database.ExecuteSqlCommand($"INSERT INTO [Store].[Products] ([CategoryId],[CurrentPrice],[Description],[IsFeatured],[ModelName],[ModelNumber],[UnitCost],[UnitsInStock]) VALUES ({categoryId}, {price}, '{description}',0,'{modelName}', '{modelNumber}', {unitCost}, {quantity})");
 }
Example #3
0
 public BaseTest()
 {
     Db = new IntroToEFContexttt();
 }