Beispiel #1
0
 public void addCard(int cardID,int entityID)
 {
     using (var ctx = new accountingEntities())
     {
         var person = ctx.people.Where(x => x.ID.Equals(entityID)).SingleOrDefault();
         var newEntityCard = new entityCard()
         {
             entityID = entityID,
             cardID = cardID
         };
         ctx.entityCards.AddObject(newEntityCard);
         ctx.SaveChanges();
     }
 }
 /// <summary>
 /// Create a new entityCard object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static entityCard CreateentityCard(global::System.Int32 id)
 {
     entityCard entityCard = new entityCard();
     entityCard.ID = id;
     return entityCard;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the entityCards EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToentityCards(entityCard entityCard)
 {
     base.AddObject("entityCards", entityCard);
 }