コード例 #1
0
 partial void DeleteCloudUser(CloudUser instance);
コード例 #2
0
 partial void InsertCloudUser(CloudUser instance);
コード例 #3
0
 partial void UpdateCloudUser(CloudUser instance);
コード例 #4
0
        private List<CloudFlashCardSet> ConverToCloudSet(List<ServiceFlashCardSet> serviceSets, CloudUser user)
        {
            List<CloudFlashCardSet> sets = new List<CloudFlashCardSet>();
            foreach (var serviceFlashCardSet in serviceSets)
            {
                CloudFlashCardSet set = new CloudFlashCardSet()
                {
                    SetName = serviceFlashCardSet.SetName,
                    ID = serviceFlashCardSet.ID,
                    //CloudUser = user,
                    UserID = user.Id

                };
                foreach (var serviceCard in serviceFlashCardSet.FlashCards)
                {
                    CloudFlashCard card = new CloudFlashCard()
                    {
                        Traditional = serviceCard.Traditional,
                        Simplified = serviceCard.Simplified,
                        Pinyin = serviceCard.Pinyin,
                        CloudFlashCardSet = set,
                        Definition = serviceCard.Definition,
                        ID = serviceCard.ID,
                        OwnerID = user.Id

                    };
                    set.CloudFlashCards.Add(card);
                }
                sets.Add(set);
            }
            return sets;
        }