Exemple #1
0
        protected override void DataPortal_Update()
        {
            var entity = new MVPoll();

            DataMapper.Map(this, entity, this.IgnoredProperties.ToArray());
            this.Entities.MVPolls.Attach(entity);
            this.Entities.SetState(entity, EntityState.Modified);
            this.Entities.SaveChanges();
            this.FieldManager.UpdateChildren(this);
        }
Exemple #2
0
        protected override void DataPortal_Insert()
        {
            var entity = new MVPoll();

            DataMapper.Map(this, entity, this.IgnoredProperties.ToArray());
            this.Entities.MVPolls.Add(entity);
            this.Entities.SaveChanges();
            this.PollID = entity.PollID;
            this.FieldManager.UpdateChildren(this);
        }
Exemple #3
0
        protected override void DataPortal_DeleteSelf()
        {
            var entity = new MVPoll();

            DataMapper.Map(this, entity, this.IgnoredProperties.ToArray());
            entity.PollDeletedFlag = true;
            entity.PollDeletedDate = DateTime.UtcNow;
            this.Entities.MVPolls.Attach(entity);
            this.Entities.SetState(entity, EntityState.Modified);
            this.Entities.SaveChanges();
        }