コード例 #1
0
        public void PegarSpelleItem(decimal spell, decimal item)
        {
            BotWoWEntities n = new BotWoWEntities();

            try
            {
                var x = (from p in n.SpellItems where p.idItem == item && p.idSpell == spell select p).First();
            }
            catch (Exception)
            {

                SpellItem s = new SpellItem();

                s.idSpell = spell;
                s.idItem = item;

                n.SpellItems.AddObject(s);
                n.SaveChanges();

            }
        }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the SpellItems EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToSpellItems(SpellItem spellItem)
 {
     base.AddObject("SpellItems", spellItem);
 }
コード例 #3
0
 /// <summary>
 /// Create a new SpellItem object.
 /// </summary>
 /// <param name="idSpell">Initial value of the idSpell property.</param>
 /// <param name="idItem">Initial value of the idItem property.</param>
 public static SpellItem CreateSpellItem(global::System.Decimal idSpell, global::System.Decimal idItem)
 {
     SpellItem spellItem = new SpellItem();
     spellItem.idSpell = idSpell;
     spellItem.idItem = idItem;
     return spellItem;
 }