public static void InitializeDatabase(DSCContext context)
 {
     if (!context.Jobs.Any())
     {
         context.Jobs.AddRange(SeedData.Jobs());
         context.SaveChanges();
     }
 }
Example #2
0
        private void dSCDebugToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Title       = "Select a PAL File";
            ofd.Filter      = "PAL files (*.pal)|*.pal|All files (*.*)|*.*";
            ofd.Multiselect = false;
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                DSCContext ctx = new DSCContext(File.ReadAllBytes(ofd.FileName));
            }
        }
Example #3
0
        public JobRepository(DSCContext context)
        {
            _context = context;

            DSCContextFactory.InitializeDatabase(_context);
        }