0

我的第一个想法是扩展作为实体的部分类“Step”。我可以添加一个 bool 属性,然后在完成对它们的处理时设置该 true/false。但是每次在对 DB 进行更改后重新生成 DBContext 时,我不必手动继续这样做吗?或者是其他方式..下面的代码解释了我想要做什么

    if ((si.StepID == 20) || (si.StepID == 23) || (si.StepID == 24))
                    {
                        //Step is a process. Each Step must be run in order
                        //get list of steps in tasks in RUN (1,2,3,4...) order
                        int stepToRun = 0;
                        var stepsInTask = InstanceExpert.GetAllStepsInTaskOrderedByRunOrder(ti.TaskInstanceID);

                        //Get which step is next to be processed
                        foreach (Step s in stepsInTask)
                        {
                            //get the stepToRun 
                            //Need to extend STEP Entity property with a bool??
                        }

                        //Take that step and run the specific function

                        if (stepToRun == 20)
                        {
                        }

                        if (stepToRun == 23)
                        {
                        }

                        if (stepToRun == 24)
                        {
                        }
4

0 回答 0