コード例 #1
0
ファイル: VisaCard.cs プロジェクト: saeidghoreshi/partition1
        public void New()
        {
            base.createNew((int)enums.ccCardType.VISACARD);

            using (var ctx = new AccContexts())
            using (var ts = new TransactionScope())
            {

                var newvisaCard = new visaCard()
                {
                    ccCardID = base.ccCardID
                };

                ctx.visaCard.AddObject(newvisaCard);
                ctx.SaveChanges();

                /*Reload object Props*/
                this.visaCardID = newvisaCard.ID;

                ts.Complete();
            }
        }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the visaCard EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTovisaCard(visaCard visaCard)
 {
     base.AddObject("visaCard", visaCard);
 }
コード例 #3
0
 /// <summary>
 /// Create a new visaCard object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 public static visaCard CreatevisaCard(global::System.Int32 id)
 {
     visaCard visaCard = new visaCard();
     visaCard.ID = id;
     return visaCard;
 }