Example #1
0
        public static void SeedTickets(SpearPOSContext context)
        {
            if (context.Tickets.Any())
            {
                return;   // DB has been seeded
            }

            context.Tickets.AddRange(
                new Ticket
            {
            },

                new Ticket
            {
            },

                new Ticket
            {
            },

                new Ticket
            {
            }
                );
            context.SaveChanges();
        }
Example #2
0
 public static void Initialize(IServiceProvider serviceProvider)
 {
     using (var context = new SpearPOSContext(
                serviceProvider.GetRequiredService <DbContextOptions <SpearPOSContext> >()))
     {
         // Look for any movies.
     }
 }
Example #3
0
 public static void SeedGroups(SpearPOSContext context)
 {
 }
Example #4
0
 public static void SeedCategories(SpearPOSContext context)
 {
 }
Example #5
0
        public static void SeedModifiers(SpearPOSContext context)
        {
            if (context.ItemModifiers.Any())
            {
                return;
            }
            context.ItemModifiers.AddRange(
                new ItemModifier
            {
                Id                 = null,
                IsDeleted          = false,
                CreationDate       = DateTime.Now,
                UpdateDate         = null,
                CreationUserId     = "seeds",
                SortOrder          = 0,
                Name               = "Item Modifier 1",
                Price              = 0,
                ExtraPrice         = 0,
                ButtonColor        = 0,
                Enable             = true,
                TextColor          = 0,
                FixedPrice         = true,
                PrintToKitchen     = true,
                SectionWisePricing = false,
                GroupId            = 1,
                TaxId              = 0
            },
                new ItemModifier
            {
                Id                 = null,
                IsDeleted          = false,
                CreationDate       = DateTime.Now,
                UpdateDate         = null,
                CreationUserId     = "seeds",
                SortOrder          = 0,
                Name               = "Item Modifier 2",
                Price              = 0,
                ExtraPrice         = 0,
                ButtonColor        = 0,
                Enable             = true,
                TextColor          = 0,
                FixedPrice         = true,
                PrintToKitchen     = true,
                SectionWisePricing = false,
                GroupId            = 1,
                TaxId              = 0
            },
                new ItemModifier
            {
                Id                 = null,
                IsDeleted          = false,
                CreationDate       = DateTime.Now,
                UpdateDate         = null,
                CreationUserId     = "seeds",
                SortOrder          = 0,
                Name               = "Item Modifier 3",
                Price              = 0,
                ExtraPrice         = 0,
                ButtonColor        = 0,
                Enable             = true,
                TextColor          = 0,
                FixedPrice         = true,
                PrintToKitchen     = true,
                SectionWisePricing = false,
                GroupId            = 1,
                TaxId              = 0
            }
                );

            context.SaveChanges();
        }
Example #6
0
 public static void SeedMenuItems(SpearPOSContext context)
 {
 }