public void DeleteGraphicInstance(GraphicInstance graphicInstance) { if ((graphicInstance.EntityState == EntityState.Detached)) { this.ObjectContext.GraphicInstances.Attach(graphicInstance); } this.ObjectContext.GraphicInstances.DeleteObject(graphicInstance); }
/// <summary> /// Create a new GraphicInstance object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="logicalInstanceId">Initial value of the LogicalInstanceId property.</param> public static GraphicInstance CreateGraphicInstance(global::System.Int32 id, global::System.Int32 logicalInstanceId) { GraphicInstance graphicInstance = new GraphicInstance(); graphicInstance.Id = id; graphicInstance.LogicalInstanceId = logicalInstanceId; return(graphicInstance); }
public void InsertGraphicInstance(GraphicInstance graphicInstance) { if ((graphicInstance.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(graphicInstance, EntityState.Added); } else { this.ObjectContext.GraphicInstances.AddObject(graphicInstance); } }
public void UpdateGraphicInstance(GraphicInstance currentGraphicInstance) { this.ObjectContext.GraphicInstances.AttachAsModified(currentGraphicInstance, this.ChangeSet.GetOriginal(currentGraphicInstance)); }
/// <summary> /// Deprecated Method for adding a new object to the GraphicInstances EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToGraphicInstances(GraphicInstance graphicInstance) { base.AddObject("GraphicInstances", graphicInstance); }