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

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

            db.ResponseContents.Add(entity);
            db.SaveChanges();
            ResponseContentItem.ResponseContentID = entity.ResponseContentID;
        }
Esempio n. 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();
        }