public void DeleteResponseContent(ResponseContentItem ResponseContentItem) { var entity = new ResponseContent { ResponseContentID = ResponseContentItem.ResponseContentID }; db.ResponseContents.Attach(entity); db.ResponseContents.Remove(entity); db.SaveChanges(); }
public void CreateResponseContent(ResponseContentItem ResponseContentItem) { var entity = new ResponseContent { ResponseContentName = ResponseContentItem.ResponseContentName }; db.ResponseContents.Add(entity); db.SaveChanges(); ResponseContentItem.ResponseContentID = entity.ResponseContentID; }
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(); }