Beispiel #1
0
        public MetricController(ICreateContext context)
        {
            _md = context;

            if (_md.Metric.Count() == 0)
            {
                _md.Metric.Add(new Metric {
                    Id = 1, Name = "Cost", Weight = 4
                });
                _md.Metric.Add(new Metric {
                    Id = 2, Name = "Personnel", Weight = 5
                });
                _md.SaveChanges();
            }
        }
Beispiel #2
0
        public IdeaController(ICreateContext context)
        {
            _md = context;

            if (_md.IdeaMaster.Count() == 0)
            {
                _md.IdeaMaster.Add(new IdeaMaster {
                    Id = 1, Name = "Test", MetricScore = "4/5/"
                });
                _md.BatchHistory.Add(new BatchHistory {
                    Id = 1, BatchNumber = 1
                });
                _md.SaveChanges();
            }
        }