Exemple #1
0
        public void DeleteResponseContent(ResponseContentItem ResponseContentItem)
        {
            var entity = new ResponseContent
            {
                ResponseContentID = ResponseContentItem.ResponseContentID
            };

            db.ResponseContents.Attach(entity);
            db.ResponseContents.Remove(entity);
            db.SaveChanges();
        }
Exemple #2
0
        public void CreateResponseContent(ResponseContentItem ResponseContentItem)
        {
            var entity = new ResponseContent
            {
                ResponseContentName = ResponseContentItem.ResponseContentName
            };

            db.ResponseContents.Add(entity);
            db.SaveChanges();
            ResponseContentItem.ResponseContentID = entity.ResponseContentID;
        }
Exemple #3
0
        public void UpdateResponseContent(ResponseContentItem ResponseContentItem)
        {
            var entity = new ResponseContent
            {
                ResponseContentID   = ResponseContentItem.ResponseContentID,
                ResponseContentName = ResponseContentItem.ResponseContentName
            };

            db.ResponseContents.Attach(entity);
            db.Entry(entity).State = EntityState.Modified;
            db.SaveChanges();
        }