Exemplo n.º 1
0
        public void UpdateGift(Gift gift)
        {
            Gift targetGift = context.Gifts.Find(gift.GiftID);

            if (targetGift != null)
            {
                targetGift.DateReceived = gift.DateReceived;
                targetGift.DateSent = gift.DateSent;
                targetGift.IsPending = gift.IsPending;
                targetGift.ReceiverID = gift.ReceiverID;
                targetGift.SenderID = gift.SenderID;
            }
        }
Exemplo n.º 2
0
 public void InsertGift(Gift gift)
 {
     context.Gifts.Add(gift);
 }