public void AddCombat(Jedi jedi, Sith sith)
        {
            if (jedi == null)
            {
                throw new ArgumentNullException(nameof(jedi));
            }
            if (sith == null)
            {
                throw new ArgumentNullException(nameof(sith));
            }

            if (Combats == null)
            {
                Combats = new ObservableCollection <Combat>();
            }

            var newCombat = new Combat(jedi, sith);

            _storage.CreateCombat(newCombat);
            _storage.SaveChanges();

            Combats.Add(newCombat);
        }
Beispiel #2
0
 public void RemoveCombat(Combat combat)
 {
     // Remove combat in the database in a transaction....
 }
Beispiel #3
0
 public void CreateCombat(Combat combat)
 {
     // Create combat in the database in a transaction...
 }