Example #1
0
        public void SeedActivityFields(LopakDbContext context)
        {
            var activityFields = new[]
            {
                new ActivityField()
                {
                    ActivityFieldId = 1, Title = "Super Market", TitleFa = "سوپرمارکت"
                },
                new ActivityField()
                {
                    ActivityFieldId = 2, Title = "Fast Food", TitleFa = "فست فود"
                },
                new ActivityField()
                {
                    ActivityFieldId = 3, Title = "Restaurant", TitleFa = "رستوران"
                }
            };

            context.ActivityField.AddRange(activityFields);
            context.SaveChanges();
        }
Example #2
0
        //private readonly Dictionary<int, Employee> Employees = new Dictionary<int, Employee>();
        //private readonly Dictionary<int, Supplier> Suppliers = new Dictionary<int, Supplier>();
        //private readonly Dictionary<int, Category> Categories = new Dictionary<int, Category>();
        //private readonly Dictionary<int, Shipper> Shippers = new Dictionary<int, Shipper>();
        //private readonly Dictionary<int, Product> Products = new Dictionary<int, Product>();

        public static void Initialize(LopakDbContext context)
        {
            var initializer = new LopakInitializer();

            initializer.SeedEverything(context);
        }