Ejemplo n.º 1
0
        public static void EnsurePopulated(IApplicationBuilder application)
        {
            // makes context variable from create scope guy which is also in start up
            ArcDBContext context = application.ApplicationServices.CreateScope()
                                   .ServiceProvider.GetRequiredService <ArcDBContext>();

            // checks to see if any migrations are needed and makes them
            if (context.Database.GetPendingMigrations().Any())
            {
                context.Database.Migrate();
            }

            if (!context.BurialLocations.Any())
            {
                context.AddRange(

                    new BurialLocation
                {
                    BurialLocationId    = 1,
                    Dig_Site_Name       = "Gamous",
                    N_S_Grid_Site_Lower = 33,
                    E_W_Grid_Site_Lower = 4,
                    E_W_Grid_Site_Upper = 43,
                    N_S_Grid_Site_Upper = 11,
                }


                    );
            }
            context.SaveChanges();
        }
Ejemplo n.º 2
0
 public EFArcRepository(ArcDBContext context)
 {
     _context = context;
 }
Ejemplo n.º 3
0
 public FileUrl(ArcDBContext context)
 {
     _context = context;
 }