Ejemplo n.º 1
0
        public static void Initialize(IServiceProvider serviceProvider)
        {
            using (var context = new OrchardDBContext(
                       serviceProvider.GetRequiredService <DbContextOptions <OrchardDBContext> >()))
            {
                // Look for any movies.
                if (context.GlobalPlantList.Any())
                {
                    return; // DB has been seeded
                }
                //var globalPlantlist = new GlobalPlantList[]
                //{
                //    //new GlobalPlantList
                //    //{
                //    //  FruitVariety = "Apple",
                //    //  Name = "Cripps Pink 'Pink Lady'",
                //    //  Origin = "Australia",
                //    //  Parentage = "Golden Delicious x Lady Williams",
                //    //  Use = "Eating",
                //    //  YearDeveloped = "1970s",
                //    //  Comments = "Crisp, very sweet and slightly tart. Light red, pink and light yellow-green striped skin."

                //    //},

                //    //new GlobalPlantList
                //    //{
                //    //  FruitVariety = "Apple",
                //    //  Name = "HoneyCrisp",
                //    //  Origin = "Minnesota, US",
                //    //  Parentage = "Keepsake x MN1627",
                //    //},
                //    //new GlobalPlantList
                //    //{
                //    //  FruitVariety = "Peach",
                //    //  Name = "Red Haven",
                //    //  Origin = "Wisconsin, US",
                //    //  Parentage = "Red x White",
                //    //}
                //};
                //context.GlobalPlantList.AddRange(globalPlantlist);
                //context.SaveChanges();
            }
        }
Ejemplo n.º 2
0
 public DetailsModel(Orchardist.Data.OrchardDBContext context)
 {
     _context = context;
 }
Ejemplo n.º 3
0
 public IndexModel(Orchardist.Data.OrchardDBContext context)
 {
     _context = context;
 }
Ejemplo n.º 4
0
 public EditModel(Orchardist.Data.OrchardDBContext context)
 {
     _context = context;
 }
Ejemplo n.º 5
0
 public CreateModel(Orchardist.Data.OrchardDBContext context)
 {
     _context = context;
 }