Пример #1
0
        public void DeleteEnemy(int id)
        {
            var enemy = _context.Find <Enemy>(id);

            _context.Remove <Enemy>(enemy);
            _context.SaveChanges();
        }
        public void DeleteAuthor(int id)
        {
            var author = _context.Find <Author>(id);

            _context.Remove <Author>(author);
            _context.SaveChanges();
        }
        public void DeleteEpisode(int id)
        {
            var episode = _context.Find <Episode>(id);

            _context.Remove <Episode>(episode);
            _context.SaveChanges();
        }
        public void DeleteCompanion(int id)
        {
            var companion = _context.Find <Companion>(id);

            _context.Remove <Companion>(companion);
        }