public void DeleteStrategyType(StrategyType strategyType)
 {
     if ((strategyType.EntityState == EntityState.Detached))
     {
         this.ObjectContext.StrategyTypes.Attach(strategyType);
     }
     this.ObjectContext.StrategyTypes.DeleteObject(strategyType);
 }
Exemple #2
0
        /// <summary>
        /// Create a new StrategyType object.
        /// </summary>
        /// <param name="strategyTypeID">Initial value of the StrategyTypeID property.</param>
        /// <param name="strategyTypeName">Initial value of the StrategyTypeName property.</param>
        public static StrategyType CreateStrategyType(global::System.Int32 strategyTypeID, global::System.String strategyTypeName)
        {
            StrategyType strategyType = new StrategyType();

            strategyType.StrategyTypeID   = strategyTypeID;
            strategyType.StrategyTypeName = strategyTypeName;
            return(strategyType);
        }
 public void InsertStrategyType(StrategyType strategyType)
 {
     if ((strategyType.EntityState != EntityState.Detached))
     {
         this.ObjectContext.ObjectStateManager.ChangeObjectState(strategyType, EntityState.Added);
     }
     else
     {
         this.ObjectContext.StrategyTypes.AddObject(strategyType);
     }
 }
 public void UpdateStrategyType(StrategyType currentStrategyType)
 {
     this.ObjectContext.StrategyTypes.AttachAsModified(currentStrategyType, this.ChangeSet.GetOriginal(currentStrategyType));
 }
Exemple #5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the StrategyTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToStrategyTypes(StrategyType strategyType)
 {
     base.AddObject("StrategyTypes", strategyType);
 }