public SongController(SongItemContext context) { _context = context; if (_context.SongItems.Count() == 0) { // Create a new SongItem if collection is empty, // which means you can't delete all SongItems. // _context.SongItems.Add(new SongItem { Name = "Item1" }); _context.SaveChanges(); } }
public SongController(SongItemContext context) { _context = context; }