コード例 #1
0
        protected override void PreSave(Card card)
        {
            if (!card.CardType.Id.HasValue)
            {
                CardTypeDataAccess.Save(card.CardType);
            }

            if (card.PrimaryImage != null)
            {
                ImageDataAccess.Save(card.PrimaryImage);
            }
        }
コード例 #2
0
        protected override void PostSave(Card card)
        {
            foreach (var link in card.HardLinks)
            {
                HardLinkDataAccess.Save(link);
            }

            foreach (var link in card.ReferencedBy)
            {
                HardLinkDataAccess.Save(link);
            }

            foreach (var image in card.AdditionalImages)
            {
                ImageDataAccess.SaveImageToCard(image, card);
            }
        }