Beispiel #1
0
        private void Child_Update(IPoll parent)
        {
            var entity = new MVPollOption();

            DataMapper.Map(this, entity, this.IgnoredProperties.ToArray());
            this.Entities.MVPollOptions.Attach(entity);
            this.Entities.SetState(entity, EntityState.Modified);
            this.Entities.SaveChanges();
        }
Beispiel #2
0
 private void Child_Fetch(MVPollOption criteria)
 {
     using (this.BypassPropertyChecks)
     {
         DataMapper.Map(criteria, this,
                        nameof(criteria.MVPoll),
                        nameof(criteria.MVPollResponses));
     }
 }
Beispiel #3
0
        private void Child_Insert(IPoll parent)
        {
            this.PollID = parent.PollID;
            var entity = new MVPollOption();

            DataMapper.Map(this, entity, this.IgnoredProperties.ToArray());
            this.Entities.MVPollOptions.Add(entity);
            this.Entities.SaveChanges();
            this.PollOptionID = entity.PollOptionID;
        }