Exemple #1
0
        public SkillController(CapsContext context)
        {
            _context = context;

            if (_context.Skills.Count() == 0)
            {
                // Create a new TodoItem if collection is empty,
                // which means you can't delete all TodoItems.
                _context.Skills.Add(new Skill { Name = "Item1" });
                _context.SaveChanges();
            }
        }
Exemple #2
0
 public OpportunityController(CapsContext context)
 {
     _context = context;
 }