Continuage d'API

This commit is contained in:
MarcEricMartel
2022-10-09 12:07:35 -07:00
parent f5351340d8
commit 1f7c97949d
7 changed files with 117 additions and 19 deletions

View File

@@ -14,22 +14,31 @@ public class InventoryContext : DbContext {
modelBuilder.Entity<Product>().HasData(new Product {
Id = 1,
Title = $"Ceinture flèchée",
Category = $"Linge",
Description = $"Pour faire votre propre bonhomme de 1837, comme dans le bon vieux temps.",
Price = 85.86M,
Quantity = 1,
isDiscontinued = false,
ImageName = $"ceintureflechee"
});
modelBuilder.Entity<Product>().HasData(new Product {
Id = 2,
Title = $"Pantoufles du Canadien en Phentex",
Category = $"Linge",
Description = $"Parce que ça sent la coupe!",
Price = 15.64M,
Quantity = 54,
isDiscontinued = false,
ImageName = $"pantouflesCH"
});
modelBuilder.Entity<Product>().HasData(new Product {
Id = 3,
Title = $"Jean-Luc Mongrain",
Category = $"Homme",
Description = $"On ne lui ferait pas mal, en tout cas!!",
Price = 1453.12M,
Quantity = 1,
isDiscontinued = true,
ImageName = $"jeanlucmongrain"
});
}