public void DeleteLogicalInstance(LogicalInstance logicalInstance) { if ((logicalInstance.EntityState == EntityState.Detached)) { this.ObjectContext.LogicalInstances.Attach(logicalInstance); } this.ObjectContext.LogicalInstances.DeleteObject(logicalInstance); }
/// <summary> /// Create a new LogicalInstance object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="type">Initial value of the Type property.</param> /// <param name="name">Initial value of the Name property.</param> public static LogicalInstance CreateLogicalInstance(global::System.Int32 id, global::System.String type, global::System.String name) { LogicalInstance logicalInstance = new LogicalInstance(); logicalInstance.Id = id; logicalInstance.Type = type; logicalInstance.Name = name; return(logicalInstance); }
public void InsertLogicalInstance(LogicalInstance logicalInstance) { if ((logicalInstance.EntityState != EntityState.Detached)) { this.ObjectContext.ObjectStateManager.ChangeObjectState(logicalInstance, EntityState.Added); } else { this.ObjectContext.LogicalInstances.AddObject(logicalInstance); } }
public void UpdateLogicalInstance(LogicalInstance currentLogicalInstance) { this.ObjectContext.LogicalInstances.AttachAsModified(currentLogicalInstance, this.ChangeSet.GetOriginal(currentLogicalInstance)); }
/// <summary> /// Deprecated Method for adding a new object to the LogicalInstances EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToLogicalInstances(LogicalInstance logicalInstance) { base.AddObject("LogicalInstances", logicalInstance); }