Esempio n. 1
0
        public void InitializeDb(MatricExcellenceDbContext context)
        {
            //context.Database.EnsureCreated();

            //if (context.Reports.Any())
            //{
            //    return;
            //}

            //var ReportList = new List<Report>()
            //{
            //    new Report
            //    {
            //        Short = 4114,
            //        Long =55245,
            //    },
            //    new Report
            //    {
            //        Short = 4589,
            //        Long =55245,
            //    },
            //    new Report
            //    {
            //        Short = 41124114,
            //        Long =8745,
            //    }
            //}.ToList();

            //foreach (var Report in ReportList)
            //{
            //    context.Reports.Add(Report);
            //}

            //context.SaveChanges();
        }
Esempio n. 2
0
 public Repository(MatricExcellenceDbContext repositoryPatternDemoContext)
 {
     RepositoryPatternDemoContext = repositoryPatternDemoContext;
 }