Example #1
0
        public void RunSeed(UniformBuilderContext context)
        {
            var uniformStyles = new List <UniformStyle>
            {
                new UniformStyle
                {
                    Id             = IdGenerator.NewId(),
                    Name           = "Style1",
                    Description    = "Description for style 1",
                    CreateDate     = DateTime.Now.AddDays(-19),
                    LastUpdateDate = DateTime.Now.AddDays(-5)
                },
                new UniformStyle
                {
                    Id             = IdGenerator.NewId(),
                    Name           = "Style2",
                    Description    = "Description for style 2",
                    CreateDate     = DateTime.Now.AddDays(-19),
                    LastUpdateDate = DateTime.Now.AddDays(-5)
                },
                new UniformStyle
                {
                    Id             = IdGenerator.NewId(),
                    Name           = "Style31",
                    Description    = "Description for style 31",
                    CreateDate     = DateTime.Now.AddDays(-19),
                    LastUpdateDate = DateTime.Now.AddDays(-5)
                },
            };

            context.AddOrUpdate <UniformStyle>(us => us.Id, uniformStyles);
        }
Example #2
0
        public void RunSeed(UniformBuilderContext context)
        {
            var users = new List <User>
            {
                new User
                {
                    Id   = IdGenerator.NewId(),
                    Name = "Ashish",
                    Type = UserType.Admin
                },
                new User
                {
                    Id   = IdGenerator.NewId(),
                    Name = "Bob",
                    Type = UserType.Dealer
                },
                new User
                {
                    Id   = IdGenerator.NewId(),
                    Name = "Ann",
                    Type = UserType.Guest
                }
            };

            context.AddOrUpdate <User>(m => m.Id, users);
        }
        public void RunSeed(UniformBuilderContext context)
        {
            IList <ApplicationType> applicationTypes = new List <ApplicationType>();

            applicationTypes.Add(new ApplicationType
            {
                Id   = IdGenerator.NewId(),
                Name = "Embroidery"
            });
            applicationTypes.Add(new ApplicationType
            {
                Id   = IdGenerator.NewId(),
                Name = "Tackle Twill"
            });
            applicationTypes.Add(new ApplicationType
            {
                Id   = IdGenerator.NewId(),
                Name = "Sublimated"
            });
            applicationTypes.Add(new ApplicationType
            {
                Id   = IdGenerator.NewId(),
                Name = "Screen Print"
            });

            context.AddOrUpdate(c => c.Id, applicationTypes);
        }