public void CreatDoctor(int id, Doctor doctorToCreate)
        {
            doctorToCreate.DoctorId = id;
            var doctor = doctorToCreate;

            _context.Doctors.Add(doctor);
            _context.SaveChanges();
        }
        public void CreatCompanion(string name, string whoPlayed)
        {
            var companion = new Companion()
            {
                CompanionName = name, WhoPlayed = whoPlayed
            };

            _context.Companions.Add(companion);
            _context.SaveChanges();
        }
        public void CreatAuthor(string name)
        {
            var author = new Author()
            {
                AuthorName = name
            };

            _context.Add <Author>(author);
            _context.SaveChanges();
        }
예제 #4
0
        public void CreatEnemy(string name, string description)
        {
            var enemy = new Enemy()
            {
                EnemyName = name, Description = description
            };

            _context.Enemys.Add(enemy);
            _context.SaveChanges();
        }
예제 #5
0
        public void AddEnemyToEpisode(int enemyId, int episodeId)
        {
            var episodeEnemy = new EpisodeEnemy()
            {
                EnemyId = enemyId, EpisodeId = episodeId
            };

            _context.Add <EpisodeEnemy>(episodeEnemy);
            _context.SaveChanges();
        }
예제 #6
0
        public void AddCompanionToEpisode(int companionId, int episodeId)
        {
            var episodeCompanion = new EpisodeCompanion()
            {
                CompanionId = companionId, EpisodeId = episodeId
            };

            _context.Add <EpisodeCompanion>(episodeCompanion);
            _context.SaveChanges();
        }
 public void CreatEpisode(Episode episode)
 {
     _context.Add <Episode>(episode);
     _context.SaveChanges();
 }