示例#1
0
        private static void RemoveJoinBetweenSamuraiAndBattleSimple()
        {
            var join = new SamuraiBattel {
                BattelId = 1, SamuraiId = 2
            };

            _context.Remove(join);
            _context.SaveChanges();
        }
示例#2
0
        private static void JoinBattleAndSamurai()
        {
            //Samurai and Battle already exist and we have their IDs
            var sbJoin = new SamuraiBattel {
                SamuraiId = 2, BattelId = 1
            };

            _context.Add(sbJoin);
            _context.SaveChanges();
        }