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(); }
private void Child_Fetch(MVPollOption criteria) { using (this.BypassPropertyChecks) { DataMapper.Map(criteria, this, nameof(criteria.MVPoll), nameof(criteria.MVPollResponses)); } }
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; }