示例#1
0
        public void AddUpdateTransitionFunctions(Dictionary<int, Function> functionDict, Transition transition)
        {
            DeleteTransitionFunctions(transition);

            foreach (var callOrder in functionDict.Keys)
            {
                var tf = new TransitionFunction();
                tf.CallOrder = callOrder;
                tf.Function = functionDict[callOrder];
                tf.Transition = transition;
                tf.ReturnMask = "";
                _db.TransitionFunctions.AddObject(tf);
            }
            SaveChanges();
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the TransitionFunctions EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTransitionFunctions(TransitionFunction transitionFunction)
 {
     base.AddObject("TransitionFunctions", transitionFunction);
 }
 /// <summary>
 /// Create a new TransitionFunction object.
 /// </summary>
 /// <param name="transitionFunctionID">Initial value of the TransitionFunctionID property.</param>
 /// <param name="transtitonID">Initial value of the TranstitonID property.</param>
 /// <param name="functionID">Initial value of the FunctionID property.</param>
 /// <param name="callOrder">Initial value of the CallOrder property.</param>
 /// <param name="returnMask">Initial value of the ReturnMask property.</param>
 public static TransitionFunction CreateTransitionFunction(global::System.Int32 transitionFunctionID, global::System.Int32 transtitonID, global::System.Int32 functionID, global::System.Int32 callOrder, global::System.String returnMask)
 {
     TransitionFunction transitionFunction = new TransitionFunction();
     transitionFunction.TransitionFunctionID = transitionFunctionID;
     transitionFunction.TranstitonID = transtitonID;
     transitionFunction.FunctionID = functionID;
     transitionFunction.CallOrder = callOrder;
     transitionFunction.ReturnMask = returnMask;
     return transitionFunction;
 }