public void DeleteResponseQuality(ResponseQualityItem ResponseQualityItem) { var entity = new ResponseQuality { ResponseQualityID = ResponseQualityItem.ResponseQualityID }; db.ResponseQualities.Attach(entity); db.ResponseQualities.Remove(entity); db.SaveChanges(); }
public void CreateResponseQuality(ResponseQualityItem ResponseQualityItem) { var entity = new ResponseQuality { ResponseQualityName = ResponseQualityItem.ResponseQualityName }; db.ResponseQualities.Add(entity); db.SaveChanges(); ResponseQualityItem.ResponseQualityID = entity.ResponseQualityID; }
public void UpdateResponseQuality(ResponseQualityItem ResponseQualityItem) { var entity = new ResponseQuality { ResponseQualityID = ResponseQualityItem.ResponseQualityID, ResponseQualityName = ResponseQualityItem.ResponseQualityName }; db.ResponseQualities.Attach(entity); db.Entry(entity).State = EntityState.Modified; db.SaveChanges(); }